Enable gdb.base/foll-fork.exp on OpenBSD
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
dd2ac174
GB
12015-03-03 Gary Benson <gbenson@redhat.com>
2
3 * hostio.c (handle_vFile): Fix prefix lengths.
4
d68e53f4
MM
52015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6
7 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8 ptr_bits.
9
bf2d68ab
AA
102015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11
12 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
13 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
14 (clean): Add "rm -f" for above C files.
15 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
16 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
17 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
18 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
19 * linux-s390-low.c (HWCAP_S390_VX): New macro.
20 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
21 (init_registers_s390x_vx_linux64)
22 (init_registers_s390x_tevx_linux64)
23 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
24 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
25 declarations.
26 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
27 (s390_store_vxrs_high): New functions.
28 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
29 NT_S390_VXRS_HIGH.
30 (s390_arch_setup): Add logic for selecting one of the new target
31 descriptions. Activate the new vector regsets if applicable.
32 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
33 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
34 and init_registers_s390x_tevx_linux64.
35
c966a859
PA
362015-03-01 Pedro Alves <palves@redhat.com>
37
38 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
39 parameter.
40
4180215b
PA
412015-02-27 Pedro Alves <palves@redhat.com>
42
43 * linux-x86-low.c (u_debugreg_offset): New function.
44 (x86_linux_dr_get, x86_linux_dr_set): Use it.
45
749bab01
PA
462015-02-27 Pedro Alves <palves@redhat.com>
47
48 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
49 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
50 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
51 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
52 (ps_lsetfpregs, ps_getpid)
53 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
54 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
55 (ps_lsetxregs, ps_plog): Declare.
56
3c14e5a3
PA
572015-02-27 Pedro Alves <palves@redhat.com>
58
59 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
60 IP_AGENT_EXPORT_FUNC.
61 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
62 IP_AGENT_EXPORT_FUNC.
63 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
64 (IP_AGENT_EXPORT): Delete.
65 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
66 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
67 (gdb_trampoline_buffer_error, collecting, gdb_collect)
68 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
69 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
70 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
71 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
72 (traceframe_read_count, traceframe_write_count)
73 (traceframes_created, trace_state_variables, get_raw_reg)
74 (get_trace_state_variable_value, set_trace_state_variable_value)
75 (ust_loaded, helper_thread_id, cmd_buf): Use
76 IPA_SYM_EXPORTED_NAME.
77 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
78 (tracepoints) Use IP_AGENT_EXPORT_VAR.
79 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
80 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
81 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
82 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
83 EXTERN_C_PUSH/EXTERN_C_POP.
84 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
85 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
86 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
87 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
88 (traceframe_write_count, traceframe_read_count)
89 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
90 (about_to_request_buffer_space, get_trace_state_variable_value)
91 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
92 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
93 EXTERN_C_PUSH/EXTERN_C_POP.
94 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
95 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
96 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
97 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
98 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
99 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
100 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
101 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
102 Define.
103 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
104 (IP_AGENT_EXPORT_VAR_DECL): Define.
105 (tracing): Declare.
106 (gdb_agent_get_raw_reg): Declare.
107
fe978cb0
PA
1082015-02-27 Tom Tromey <tromey@redhat.com>
109 Pedro Alves <palves@redhat.com>
110
111 Rename symbols whose names are reserved C++ keywords throughout.
112
3bc3d82a
PA
1132015-02-27 Pedro Alves <palves@redhat.com>
114
115 * Makefile.in (COMPILER): New, get it from autoconf.
116 (CXX): Get from autoconf instead.
117 (COMPILE.pre): Use COMPILER.
118 (CC-LD): Rename to ...
119 (CC_LD): ... this. Use COMPILER.
120 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
121 (CXX_FOR_TARGET): Default to g++ instead of gcc.
122 * acinclude.m4: Include build-with-cxx.m4.
123 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
124 Disable -Werror by default if building in C++ mode.
125 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
126 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
127 the C++ compiler. Save/restore CXXFLAGS too.
128 * configure: Regenerate.
129
07697489
PA
1302015-02-27 Pedro Alves <palves@redhat.com>
131
132 * acinclude.m4: Include libiberty.m4.
133 * configure.ac: Call libiberty_INIT.
134 * config.in, configure: Regenerate.
135
9beb7c4e
PA
1362015-02-26 Pedro Alves <palves@redhat.com>
137
138 * linux-low.c (linux_wait_1): When incrementing the PC past a
139 program breakpoint always use the_low_target.breakpoint_len as
140 increment, rather than the maximum between that and
141 the_low_target.decr_pc_after_break.
142
8090aef2
PA
1432015-02-23 Pedro Alves <palves@redhat.com>
144
145 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
146 thread was doing a step-over; always adjust the PC if
147 we stepped over a permanent breakpoint.
148 (linux_wait_1): If we stepped over breakpoint that was on top of a
149 permanent breakpoint, manually advance the PC past it.
150
bc9540e8
PA
1512015-02-23 Pedro Alves <palves@redhat.com>
152
153 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
154 modes.
155 (x86_fill_gregset, x86_store_gregset): Use it when handling
156 $orig_eax.
157
2db9a427
PA
1582015-02-20 Pedro Alves <palves@redhat.com>
159
160 * thread-db.c: Include "nat/linux-procfs.h".
161 (thread_db_init): Skip listing new threads if the kernel supports
162 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
163
afa8d396
PA
1642015-02-20 Pedro Alves <palves@redhat.com>
165
166 * linux-low.c (status_pending_p_callback): Use ptid_match.
167
c9587f88
AT
1682015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
169
170 PR breakpoints/16812
171 * linux-low.c (wstatus_maybe_breakpoint): Remove.
172 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
173 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
174
b05ec7a5
AT
1752015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
176
177 PR breakpoints/15956
178 * tracepoint.c (cmd_qtinit): Add check for current_thread.
179
d33501a5
MM
1802015-02-09 Markus Metzger <markus.t.metzger@intel.com>
181
182 * linux-low.c (linux_low_btrace_conf): Print size.
183 * server.c (handle_btrace_conf_general_set): New.
184 (hanle_general_set): Call handle_btrace_conf_general_set.
185 (handle_query): Report Qbtrace-conf:bts:size as supported.
186
f4abbc16
MM
1872015-02-09 Markus Metzger <markus.t.metzger@intel.com>
188
189 * linux-low.c (linux_low_enable_btrace): Update parameters.
190 (linux_low_btrace_conf): New.
191 (linux_target_ops)<to_btrace_conf>: Initialize.
192 * server.c (current_btrace_conf): New.
193 (handle_btrace_enable): Rename to ...
194 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
195 to target_enable_btrace. Update comment. Update users.
196 (handle_qxfer_btrace_conf): New.
197 (qxfer_packets): Add btrace-conf entry.
198 (handle_query): Report qXfer:btrace-conf:read as supported packet.
199 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
200 (target_ops)<read_btrace_conf>: New.
201 (target_enable_btrace): Update parameters.
202 (target_read_btrace_conf): New.
203
043c3577
MM
2042015-02-09 Markus Metzger <markus.t.metzger@intel.com>
205
206 * server.c (handle_btrace_general_set): Remove call to
207 target_supports_btrace.
208 (supported_btrace_packets): New.
209 (handle_query): Call supported_btrace_packets.
210 * target.h: include btrace-common.h.
211 (btrace_target_info): Removed.
212 (supports_btrace, target_supports_btrace): Update parameters.
213
734b0e4b
MM
2142015-02-09 Markus Metzger <markus.t.metzger@intel.com>
215
216 * Makefile.in (SFILES): Add common/btrace-common.c.
217 (OBS): Add common/btrace-common.o.
218 (btrace-common.o): Add build rules.
219 * linux-low: Include btrace-common.h.
220 (linux_low_read_btrace): Use struct btrace_data. Call
221 btrace_data_init and btrace_data_fini.
222
d6c146e9
PA
2232015-02-06 Pedro Alves <palves@redhat.com>
224
225 * thread-db.c (find_new_threads_callback): Add debug output.
226
20ba1ce6
PA
2272015-02-04 Pedro Alves <palves@redhat.com>
228
229 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
230 (resume_stopped_resumed_lwps): New function.
231 (linux_wait_for_event_filtered): Use it.
232
8cc73a39
SDJ
2332015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
234
235 * Makefile.in (SFILES): Add linux-personality.c.
236 (linux-personality.o): New rule.
237 * configure.srv (srv_linux_obj): Add linux-personality.o to the
238 list of objects to be built.
239 * linux-low.c: Include nat/linux-personality.h.
240 (linux_create_inferior): Remove code to disable address space
241 randomization (moved to ../nat/linux-personality.c). Create
242 cleanup to disable address space randomization.
243
fb23d554
SDJ
2442015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
245
246 * Makefile.in (posix-strerror.o): New rule.
247 (mingw-strerror.o): Likewise.
248 * configure: Regenerated.
249 * configure.ac: Source file ../common/common.host. Initialize new
250 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
251
cdf43629
YQ
2522015-01-14 Yao Qi <yao@codesourcery.com>
253
254 * Makefile.in (SFILES): Add nat/ppc-linux.c.
255 (ppc-linux.o): New rule.
256 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
257 * configure.ac: AC_CHECK_FUNCS(getauxval).
258 * config.in: Re-generated.
259 * configure: Re-generated.
260 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
261 ppc64_64bit_inferior_p
262
514c5338
YQ
2632015-01-14 Yao Qi <yao@codesourcery.com>
264
265 * linux-ppc-low.c: Include "nat/ppc-linux.h".
266 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
267 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
268 (PT_ORIG_R3, PT_TRAP): Likewise.
269 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
270 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
271 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
272
3368c1e5
JB
2732015-01-10 Joel Brobecker <brobecker@adacore.com>
274
275 * i387-fp.c (i387_cache_to_xsave): In look over
276 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
277 zmmh_low_space field by use of zmmh_high_space.
278
582511be
PA
2792015-01-09 Pedro Alves <palves@redhat.com>
280
281 * linux-low.c (step_over_bkpt): Move higher up in the file.
282 (handle_extended_wait): Don't store the stop_pc here.
283 (get_stop_pc): Adjust comments and rename to ...
284 (check_stopped_by_breakpoint): ... this. Record whether the LWP
285 stopped for a software breakpoint or hardware breakpoint.
286 (thread_still_has_status_pending_p): New function.
287 (status_pending_p_callback): Use
288 thread_still_has_status_pending_p. If the event is no longer
289 interesting, resume the LWP.
290 (handle_tracepoints): Add assert.
291 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
292 (wstatus_maybe_breakpoint): New function.
293 (cancel_breakpoint): Delete function.
294 (check_stopped_by_watchpoint): New function, factored out from
295 linux_low_filter_event.
296 (lp_status_maybe_breakpoint): Delete function.
297 (linux_low_filter_event): Remove filter_ptid argument.
298 Leave thread group exits pending here. Store the LWP's stop PC.
299 Always leave events pending.
300 (linux_wait_for_event_filtered): Pull all events out of the
301 kernel, and leave them all pending.
302 (count_events_callback, select_event_lwp_callback): Consider all
303 events.
304 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
305 (select_event_lwp): Only give preference to the stepping LWP in
306 all-stop mode. Adjust comments.
307 (ignore_event): New function.
308 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
309 references to cancel_breakpoints. Adjust to renames. Also give
310 equal priority to all LWPs that have had events in non-stop mode.
311 If reporting a software breakpoint event, unadjust the LWP's PC.
312 (linux_wait): If linux_wait_1 returned an ignored event, retry.
313 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
314 Adjust.
315 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
316 (resume_status_pending_p): Use thread_still_has_status_pending_p.
317 (linux_stopped_by_watchpoint): Adjust.
318 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
319 * linux-low.h (enum lwp_stop_reason): New.
320 (struct lwp_info) <stop_pc>: Adjust comment.
321 <stopped_by_watchpoint>: Delete field.
322 <stop_reason>: New field.
323 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
324 * mem-break.c (software_breakpoint_inserted_here)
325 (hardware_breakpoint_inserted_here): New function.
326 * mem-break.h (software_breakpoint_inserted_here)
327 (hardware_breakpoint_inserted_here): Declare.
328 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
329 (cancel_breakpoints): Delete.
330 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
331 (upload_fast_traceframes): Remove references to
332 cancel_breakpoints.
333
a33e3959
PA
3342015-01-09 Pedro Alves <palves@redhat.com>
335
336 * thread-db.c (find_new_threads_callback): Ignore thread if the
337 kernel thread ID is -1.
338
8784d563
PA
3392015-01-09 Pedro Alves <palves@redhat.com>
340
341 * linux-low.c (linux_attach_fail_reason_string): Move to
342 nat/linux-ptrace.c, and rename.
343 (linux_attach_lwp): Update comment.
344 (attach_proc_task_lwp_callback): New function.
345 (linux_attach): Adjust to rename and use
346 linux_proc_attach_tgid_threads.
347 (linux_attach_fail_reason_string): Delete declaration.
348
76f2b779
JB
3492015-01-01 Joel Brobecker <brobecker@adacore.com>
350
351 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
352 * server.c (gdbserver_version): Likewise.
353
fafcc06a
SDJ
3542014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
355
356 * remote-utils.c: Include ctype.h.
357 (input_interrupt): Explicitly handle the case when the char
358 received is the NUL byte. Improve the printing of non-ASCII
359 characters.
360
beed38b8
JB
3612014-12-16 Joel Brobecker <brobecker@adacore.com>
362
363 * linux-low.c (linux_low_filter_event): Update call to
364 linux_enable_event_reporting following the addition of
365 a new parameter to that function.
366
bf330350
CU
3672014-12-16 Catalin Udma <catalin.udma@freescale.com>
368
369 PR server/17457
370 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
371 (AARCH64_FPCR_REGNO): Likewise.
372 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
373 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
374 (aarch64_store_fpregset): Likewise.
375
5227d625
JB
3762014-12-15 Joel Brobecker <brobecker@adacore.com>
377
378 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
379 Remove FIXME comment about assumption about N.
380
f93b65a0
JB
3812014-12-13 Joel Brobecker <brobecker@adacore.com>
382
383 * configure.ac: If large-file support is disabled in GDBserver,
384 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
385 * configure: Regenerate.
386
e5a9158d
AA
3872014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
388
389 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
390 warning upon ENODATA from ptrace.
391 * linux-s390-low.c (s390_store_tdb): New.
392 (s390_regsets): Add regset for NT_S390_TDB.
393
feea5f36
AA
3942014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
395
396 * linux-low.c (regsets_store_inferior_registers): Skip regsets
397 without a fill_function.
398 * linux-s390-low.c (s390_fill_last_break): Remove.
399 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
400 (s390_arch_setup): Use regset's size instead of fill_function for
401 loop end condition.
402
098dbe61
AA
4032014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
404
405 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
406 the regset's store function when ptrace returned an error.
407 * regcache.c (get_thread_regcache): Invalidate register cache
408 before fetching inferior's registers.
409
28eef672
AA
4102014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
411
412 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
413 while-loop as for-loop.
414 (regsets_store_inferior_registers): Likewise.
415
bdca27a2
YQ
4162014-11-28 Yao Qi <yao@codesourcery.com>
417
418 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
419 * config.in, configure: Re-generate.
420 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
421 is defined.
422
9c232dda
YQ
4232014-11-21 Yao Qi <yao@codesourcery.com>
424
425 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
426 (AC_CHECK_HEADERS): Remove malloc.h.
427 * configure: Re-generated.
428 * config.in: Re-generated.
429 * server.h: Don't include alloca.h and malloc.h.
430 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
431 Don't include malloc.h.
432
43968415
JB
4332014-11-17 Joel Brobecker <brobecker@adacore.com>
434
435 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
436 corresponding ERRNO check in same block.
437
40e91bc7
PA
4382014-11-12 Pedro Alves <palves@redhat.com>
439
440 * server.c (cont_thread): Update comment.
441 (start_inferior, attach_inferior): No longer clear cont_thread.
442 (handle_v_cont): No longer set cont_thread.
443 (captured_main): Clear cont_thread each time a GDB connects.
444
c2c118cf
PA
4452014-11-12 Pedro Alves <palves@redhat.com>
446
447 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
448 thread, and don't resume all threads if the Hc thread has exited.
449
78708b7c
PA
4502014-11-12 Pedro Alves <palves@redhat.com>
451
452 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
453 the process group instead of to a specific LWP.
454
a2abc7de
PA
4552014-10-15 Pedro Alves <palves@redhat.com>
456
457 PR server/17487
458 * win32-arm-low.c (arm_set_thread_context): Remove current_event
459 parameter.
460 (arm_set_thread_context): Delete.
461 (the_low_target): Adjust.
462 * win32-i386-low.c (debug_registers_changed)
463 (debug_registers_used): Delete.
464 (update_debug_registers_callback): New function.
465 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
466 needing to update their debug registers.
467 (win32_get_current_dr): New function.
468 (x86_dr_low_get_addr, x86_dr_low_get_control)
469 (x86_dr_low_get_status): Fetch the debug register from the thread
470 record's context.
471 (i386_initial_stuff): Adjust.
472 (i386_get_thread_context): Remove current_event parameter. Don't
473 clear debug_registers_changed nor copy DR values to
474 debug_reg_state.
475 (i386_set_thread_context): Delete.
476 (i386_prepare_to_resume): New function.
477 (i386_thread_added): Mark the thread as needing to update irs
478 debug registers.
479 (the_low_target): Remove i386_set_thread_context and install
480 i386_prepare_to_resume.
481 * win32-low.c (win32_get_thread_context): Adjust.
482 (win32_set_thread_context): Use SetThreadContext
483 directly.
484 (win32_prepare_to_resume): New function.
485 (win32_require_context): New function, factored out from ...
486 (thread_rec): ... this.
487 (continue_one_thread): Call win32_prepare_to_resume on each thread
488 we're about to continue.
489 (win32_resume): Call win32_prepare_to_resume on the event thread.
490 * win32-low.h (struct win32_thread_info)
491 <debug_registers_changed>: New field.
492 (struct win32_target_ops): Change prototype of set_thread_context,
493 delete set_thread_context and add prepare_to_resume.
494 (win32_require_context): New declaration.
495
a442d071
GB
4962014-10-08 Gary Benson <gbenson@redhat.com>
497
498 * server.h: Do not include common-exceptions.h.
499
6f1947e8
GB
5002014-10-08 Gary Benson <gbenson@redhat.com>
501
502 * server.h: Do not include cleanups.h.
503
63b434a4
JH
5042014-09-30 James Hogan <james.hogan@imgtec.com>
505
506 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
507 mips64-dsp-linux.c.
508
c4d9ceb6
YQ
5092014-09-23 Yao Qi <yao@codesourcery.com>
510
511 * linux-low.c (lp_status_maybe_breakpoint): New function.
512 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
513 (count_events_callback): Likewise.
514 (select_event_lwp_callback): Likewise.
515 (cancel_breakpoints_callback): Likewise.
516
89a5711c
DB
5172014-09-19 Don Breazeal <donb@codesourcery.com>
518
519 * linux-low.c (handle_extended_wait): Call
520 linux_ptrace_get_extended_event.
521 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
522 linux_is_extended_waitstatus.
523
bffc0964
JB
5242014-09-16 Joel Brobecker <brobecker@adacore.com>
525
526 * Makefile.in (CPPFLAGS): Define.
527 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
528 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
529
0bfdf32f
GB
5302014-09-16 Gary Benson <gbenson@redhat.com>
531
532 * inferiors.h (current_inferior): Renamed as...
533 (current_thread): New variable. All uses updated.
534 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
535 (maybe_move_out_of_jump_pad): Likewise.
536 (cancel_breakpoint): Likewise.
537 (linux_low_filter_event): Likewise.
538 (wait_for_sigstop): Likewise.
539 (linux_resume_one_lwp): Likewise.
540 (need_step_over_p): Likewise.
541 (start_step_over): Likewise.
542 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
543 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
544 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
545 and save_inferior as saved_thread.
546 * regcache.c (get_thread_regcache): Renamed saved_inferior as
547 saved_thread.
548 (regcache_invalidate_thread): Likewise.
549 * remote-utils.c (prepare_resume_reply): Likewise.
550 * thread-db.c (thread_db_get_tls_address): Likewise.
551 (disable_thread_event_reporting): Likewise.
552 (remove_thread_event_breakpoints): Likewise.
553 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
554 as saved_thread.
555 * target.h (set_desired_inferior): Renamed as...
556 (set_desired_thread): New declaration. All uses updated.
557 * server.c (myresume): Updated comment to reference thread instead
558 of inferior.
559 (handle_serial_event): Likewise.
560 (handle_target_event): Likewise.
561
361c8ade
GB
5622014-09-12 Tom Tromey <tromey@redhat.com>
563 Gary Benson <gbenson@redhat.com>
564
565 * regcache.h: Include common-regcache.h.
566 (regcache_read_pc): Don't declare.
567 * regcache.c (get_thread_regcache_for_ptid): New function.
568
bd9269f7
GB
5692014-09-11 Tom Tromey <tromey@redhat.com>
570 Gary Benson <gbenson@redhat.com>
571
572 * symbol.c: New file.
573 * Makefile.in (SFILES): Add symbol.c.
574 (OBS): Add symbol.o.
575
f8c1d06b
GB
5762014-09-11 Gary Benson <gbenson@redhat.com>
577
578 * target.c (target_stop_ptid, target_continue_ptid): New
579 functions.
580
721ec300
GB
5812014-09-11 Tom Tromey <tromey@redhat.com>
582 Gary Benson <gbenson@redhat.com>
583
584 * target.h: Include target/target.h.
585 * target.c (target_read_memory, target_read_uint32)
586 (target_write_memory): New functions.
587
c5e92cca
GB
5882014-09-11 Gary Benson <gbenson@redhat.com>
589
590 * server.h (debug_hw_points): Don't declare.
591 * server.c (debug_hw_points): Don't define. Replace all uses
592 with show_debug_regs.
593 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
594 all uses with show_debug_regs.
595
2e4bb98a
EBM
5962014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
597
598 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
599 endianness into account.
600 (ppc_supply_ptrace_register): Likewise.
601
ac740bc7
JH
6022014-09-03 James Hogan <james.hogan@imgtec.com>
603
604 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
605 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
606
97ea6506
GB
6072014-09-03 Gary Benson <gbenson@redhat.com>
608
609 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
610 ALL_DEBUG_ADDRESS_REGISTERS.
611
df7e5265
GB
6122014-09-02 Gary Benson <gbenson@redhat.com>
613
614 * i386-low.h: Renamed as...
615 * x86-low.h: New file. All type, function and variable name
616 prefixes changed from "i386_" to "x86_". All references updated.
617 * i386-low.c: Renamed as...
618 * x86-low.c: New file. All type, function and variable name
619 prefixes changed from "i386_" to "x86_". All references updated.
620
ed859da7
GB
6212014-09-02 Gary Benson <gbenson@redhat.com>
622
623 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
624 (x86_linux_new_thread): Likewise.
625
860789c7
GB
6262014-08-29 Gary Benson <gbenson@redhat.com>
627
628 * server.h (setjmp.h): Do not include.
629 (toplevel): Do not declare.
630 (common-exceptions.h): Include.
631 (cleanups.h): Likewise.
632 * server.c (toplevel): Do not define.
633 (exit_code): New static global.
634 (detach_or_kill_for_exit_cleanup): New function.
635 (main): New function. Original main renamed to...
636 (captured_main): New function.
637 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
638
ff55e1b5
GB
6392014-08-29 Gary Benson <gbenson@redhat.com>
640
641 * Makefile.in (SFILES): Add common/common-exceptions.c.
642 (OBS): Add common-exceptions.o.
643 (common-exceptions.o): New rule.
644 * utils.c (prepare_to_throw_exception): New function.
645
e9bcb658
GB
6462014-08-29 Gary Benson <gbenson@redhat.com>
647
648 * config.in: Regenerate.
649 * configure: Likewise.
650
e3180625
GB
6512014-08-29 Gary Benson <gbenson@redhat.com>
652
653 * Makefile.in (SFILES): Add common/cleanups.c.
654 (OBS): cleanups.o.
655 (cleanups.o): New rule.
656
e3d6ba5d
GB
6572014-08-29 Gary Benson <gbenson@redhat.com>
658
659 * utils.c (internal_vwarning): New function.
660
7096e886
GB
6612014-08-28 Gary Benson <gbenson@redhat.com>
662
663 * utils.h (fatal): Remove declaration.
664 * utils.c (fatal): Remove function.
665
14ce3192
GB
6662014-08-28 Gary Benson <gbenson@redhat.com>
667
668 * tracepoint.c (gdb_agent_init): Replace fatal with
669 perror_with_name.
670 (initialize_tracepoint): Likewise.
671
50278d59
GB
6722014-08-28 Gary Benson <gbenson@redhat.com>
673
674 * remote-utils.c (remote_prepare): Replace fatal with error.
675
aa96c426
GB
6762014-08-28 Gary Benson <gbenson@redhat.com>
677
678 * linux-low.c (linux_async): Replace fatal with warning.
679 Tidy up and return.
680 (linux_start_non_stop): Return -1 if linux_async failed.
681
f7160e97
GB
6822014-08-28 Gary Benson <gbenson@redhat.com>
683
684 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
685 gdb_assert.
686 (i386_dr_low_get_addr): Remove vague comment.
687 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
688 gdb_assert.
689
38e08fca
GB
6902014-08-28 Gary Benson <gbenson@redhat.com>
691
692 * inferiors.c (get_thread_process): Replace check with gdb_assert.
693 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
694 internal_error.
695 (linux_resume_one_lwp): Likewise.
696 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
697 gdb_assert.
698 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
699 with internal_error.
700 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
701 (init_register_cache): Replace fatal with gdb_assert_not_reached.
702 (find_register_by_name): Replace fatal with internal_error.
703 (find_regno): Likewise.
704 * tdesc.c (init_target_desc): Replace check with gdb_assert.
705 * thread-db.c (thread_db_create_event): Likewise.
706 (thread_db_load_search): Likewise.
707 (try_thread_db_load_1): Likewise.
708 * tracepoint.c (get_jump_space_head): Replace fatal with
709 internal_error.
710 (claim_trampoline_space): Likewise.
711 (have_fast_tracepoint_trampoline_buffer): Likewise.
712 (cmd_qtstart): Likewise.
713 (stop_tracing): Likewise.
714 (fast_tracepoint_collecting): Likewise.
715 (target_malloc): Likewise.
716 (download_tracepoint): Likewise.
717 (download_trace_state_variables): Replace check with gdb_assert.
718 (upload_fast_traceframes): Replace fatal with internal_error.
719
34abf635
GB
7202014-08-19 Tom Tromey <tromey@redhat.com>
721 Gary Benson <gbenson@redhat.com>
722
723 * Makefile.in (SFILES): Add common/common-debug.c.
724 (OBS): Add common-debug.o.
725 (common-debug.o): New rule.
726 * debug.h (debug_printf): Don't declare.
727 * debug.c (debug_printf): Renamed and rewritten as...
728 (debug_vprintf): New function.
729
f6e94d78
GB
7302014-08-19 Gary Benson <gbenson@redhat.com>
731
732 * utils.h: Do not include print-utils.h.
733
9239eeab
GB
7342014-08-19 Tom Tromey <tromey@redhat.com>
735 Gary Benson <gbenson@redhat.com>
736
737 * server.h: Add static assertion.
738 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
739
ef87c8bb
GB
7402014-08-19 Tom Tromey <tromey@redhat.com>
741 Gary Benson <gbenson@redhat.com>
742
743 * Makefile.in (SFILES): Add common/errors.c.
744 (OBS): Add errors.o.
745 (IPA_OBS): Add errors-ipa.o.
746 (errors.o): New rule.
747 (errors-ipa.o): Likewise.
748 * utils.h (perror_with_name, error, warning): Don't declare.
749 * utils.c (warning): Renamed and rewritten as...
750 (vwarning): New function.
751 (error): Renamed and rewritten as...
752 (verror): New function.
753 (internal_error): Renamed and rewritten as...
754 (internal_verror): New function.
755
bb974a24
GB
7562014-08-07 Gary Benson <gbenson@redhat.com>
757
758 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
759 * configure: Regenerate.
760 * config.in: Likewise.
761 * server.h: Do not include errno.h.
762 * event-loop.c: Likewise.
763 * hostio-errno.c: Likewise.
764 * linux-low.c: Likewise.
765 * remote-utils.c: Likewise.
766 * spu-low.c: Likewise.
767 * utils.c: Likewise.
768 * gdbreplay.c: Unconditionally include errno.h.
769
6d3d12eb
GB
7702014-08-07 Gary Benson <gbenson@redhat.com>
771
772 * server.h: Do not include string.h.
773 * event-loop.c: Likewise.
774 * linux-low.c: Likewise.
775 * regcache.c: Likewise.
776 * remote-utils.c: Likewise.
777 * spu-low.c: Likewise.
778 * utils.c: Likewise.
779
dccbb609
GB
7802014-08-07 Gary Benson <gbenson@redhat.com>
781
782 * server.h: Do not include gdb_assert.h.
783
e76df0d0
GB
7842014-08-07 Gary Benson <gbenson@redhat.com>
785
786 * server.h: Do not include common-utils.h.
787
4cb9c816
GB
7882014-08-07 Gary Benson <gbenson@redhat.com>
789
790 * server.h: Do not include ptid.h.
791 * notif.h: Likewise.
792
3995eeee
GB
7932014-08-07 Gary Benson <gbenson@redhat.com>
794
795 * server.h: Do not include gdb_locale.h.
796
cb9f1a9b
GB
7972014-08-07 Gary Benson <gbenson@redhat.com>
798
799 * server.h: Do not include gdb/signals.h.
800 * win32-low.c: Likewise.
801
a5fceff8
GB
8022014-08-07 Gary Benson <gbenson@redhat.com>
803
804 * server.h: Do not include pathmax.h.
805
b9391142
GB
8062014-08-07 Gary Benson <gbenson@redhat.com>
807
808 * server.h: Do not include libiberty.h.
809 * linux-bfin-low.c: Likewise.
810
0e443c87
GB
8112014-08-07 Gary Benson <gbenson@redhat.com>
812
813 * server.h: Do not include ansidecl.h.
814
8ebb3f56
GB
8152014-08-07 Gary Benson <gbenson@redhat.com>
816
817 * linux-x86-low.c: Do not include stddef.h.
818 * lynx-ppc-low.c: Likewise.
819 * tracepoint.c: Likewise.
820
8980bdf6
GB
8212014-08-07 Gary Benson <gbenson@redhat.com>
822
823 * server.h: Do not include stdarg.h.
824 * nto-low.c: Likewise.
825
d7096f71
GB
8262014-08-07 Gary Benson <gbenson@redhat.com>
827
828 * server.h: Do not include stdlib.h.
829 * inferiors.c: Likewise.
830 * linux-low.c: Likewise.
831 * regcache.c: Likewise.
832 * spu-low.c: Likewise.
833 * tracepoint.c: Likewise.
834 * utils.c: Likewise.
835
d02f550d
GB
8362014-08-07 Gary Benson <gbenson@redhat.com>
837
838 * server.h: Do not include stdio.h.
839 * linux-low.c: Likewise.
840 * remote-utils.c: Likewise.
841 * spu-low.c: Likewise.
842 * utils.c: Likewise.
843 * wincecompat.c: Likewise.
844
87f6c4e3
GB
8452014-08-06 Gary Benson <gbenson@redhat.com>
846
847 * regcache.c (init_register_cache): Move conditionals inside if.
848
7089dca4
GB
8492014-08-06 Gary Benson <gbenson@redhat.com>
850
851 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
852
462f517e
GB
8532014-07-31 Gary Benson <gbenson@redhat.com>
854
855 * ax.h: Do not include server.h.
856 * gdbthread.h: Likewise.
857 * lynx-low.h: Likewise.
858 * notif.h: Likewise.
859
976411d6
GB
8602014-07-30 Gary Benson <gbenson@redhat.com>
861
862 * server.h: Include common-defs.h.
863 Do not include config.h or build-gnulib-gdbserver/config.h.
864
d41f6d8e
GB
8652014-07-30 Gary Benson <gbenson@redhat.com>
866
867 * hostio-errno.c: Move server.h to top of includes list.
868 * inferiors.c: Likewise.
869 * linux-x86-low.c: Likewise.
870 * notif.c: Include server.h.
871
314c6a35
TT
8722014-07-24 Tom Tromey <tromey@redhat.com>
873 Gary Benson <gbenson@redhat.com>
874
875 * server.h (CORE_ADDR): Now unsigned.
876
69ff6be5
PA
8772014-07-16 Pedro Alves <palves@redhat.com>
878
879 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
880
ce9e3fe7
PA
8812014-07-15 Pedro Alves <palves@redhat.com>
882
883 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
884 copy.
885
e76126e8
PA
8862014-07-11 Pedro Alves <palves@redhat.com>
887
888 * linux-low.c (kill_wait_lwp): New function, based on
889 kill_one_lwp_callback, but use my_waitpid directly.
890 (kill_one_lwp_callback, linux_kill): Use it.
891
8e9db26e
PA
8922014-06-23 Pedro Alves <palves@redhat.com>
893
894 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
895 before setting DR0..DR3.
896
698b3e08
GB
8972014-06-20 Gary Benson <gbenson@redhat.com>
898
899 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
900 * configure: Regenerated.
901 * config.in: Likewise.
902
125f8a3d
GB
9032014-06-20 Gary Benson <gbenson@redhat.com>
904
905 * Makefile.in (SFILES): Update locations for files moved
906 from common to nat.
907 (object file files): Reordered.
908
42995dbd
GB
9092014-06-20 Gary Benson <gbenson@redhat.com>
910
911 * i386-low.h (i386_dr_low_can_set_addr): Removed.
912 (i386_dr_low_set_addr): Likewise.
913 (i386_dr_low_get_addr): Likewise.
914 (i386_dr_low_can_set_control): Likewise.
915 (i386_dr_low_set_control): Likewise.
916 (i386_dr_low_get_control): Likewise.
917 (i386_dr_low_get_status): Likewise.
918 (i386_get_debug_register_length): Likewise.
919 * linux-x86-low.c (i386_dr_low_set_addr):
920 Changed signature. Made static.
921 (i386_dr_low_get_addr): Likewise.
922 (i386_dr_low_set_control): Likewise.
923 (i386_dr_low_get_control): Likewise.
924 (i386_dr_low_get_status): Likewise.
925 (i386_dr_low): New global variable.
926 * win32-i386-low.c (i386_dr_low_set_addr):
927 Changed signature. Made static.
928 (i386_dr_low_get_addr): Likewise.
929 (i386_dr_low_set_control): Likewise.
930 (i386_dr_low_get_control): Likewise.
931 (i386_dr_low_get_status): Likewise.
932 (i386_dr_low): New global variable.
933
e1d2394b
MS
9342014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
935
936 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
937 * Makefile.in (AR, AR_FLAGS): Define.
938 * configure: Regenerate.
939
3a8ee006
GB
9402014-06-19 Gary Benson <gbenson@redhat.com>
941
942 * Makefile.in (i386-dregs.o): New rule.
943 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
944 * i386-low.c (target.h): Remove include.
945 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
946 (DR_CONTROL_SHIFT): Likewise.
947 (DR_CONTROL_SIZE): Likewise.
948 (DR_RW_EXECUTE): Likewise.
949 (DR_RW_WRITE): Likewise.
950 (DR_RW_READ): Likewise.
951 (DR_RW_IORW): Likewise.
952 (DR_LEN_1): Likewise.
953 (DR_LEN_2): Likewise.
954 (DR_LEN_4): Likewise.
955 (DR_LEN_8): Likewise.
956 (DR_LOCAL_ENABLE_SHIFT): Likewise.
957 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
958 (DR_ENABLE_SIZE): Likewise.
959 (DR_LOCAL_SLOWDOWN): Likewise.
960 (DR_GLOBAL_SLOWDOWN): Likewise.
961 (DR_CONTROL_RESERVED): Likewise.
962 (I386_DR_CONTROL_MASK): Likewise.
963 (I386_DR_VACANT): Likewise.
964 (I386_DR_LOCAL_ENABLE): Likewise.
965 (I386_DR_GLOBAL_ENABLE): Likewise.
966 (I386_DR_DISABLE): Likewise.
967 (I386_DR_SET_RW_LEN): Likewise.
968 (I386_DR_GET_RW_LEN): Likewise.
969 (I386_DR_WATCH_HIT): Likewise.
970 (i386_wp_op_t): Likewise.
971 (i386_show_dr): Likewise.
972 (i386_length_and_rw_bits): Likewise.
973 (i386_insert_aligned_watchpoint): Likewise.
974 (i386_remove_aligned_watchpoint): Likewise.
975 (i386_handle_nonaligned_watchpoint): Likewise.
976 i386_update_inferior_debug_regs(): Likewise.
977 (i386_dr_insert_watchpoint): Likewise.
978 (i386_dr_remove_watchpoint): Likewise.
979 (i386_dr_region_ok_for_watchpoint): Likewise.
980 (i386_dr_stopped_data_address): Likewise.
981 (i386_dr_stopped_by_watchpoint): Likewise.
982
8f26655c
GB
9832014-06-19 Gary Benson <gbenson@redhat.com>
984
985 * i386-low.c (i386_dr_show): Renamed to
986 i386_show_dr and made static. All uses updated.
987 (i386_dr_length_and_rw_bits): Renamed to
988 i386_length_and_rw_bits and made static.
989 All uses updated.
990 (i386_dr_insert_aligned_watchpoint): Renamed to
991 i386_insert_aligned_watchpoint and made static.
992 All uses updated.
993 (i386_dr_remove_aligned_watchpoint): Renamed to
994 i386_remove_aligned_watchpoint and made static.
995 All uses updated.
996 (i386_dr_update_inferior_debug_regs): Renamed to
997 i386_update_inferior_debug_regs and made static.
998 All uses updated.
999
b9228891
GB
10002014-06-18 Gary Benson <gbenson@redhat.com>
1001
5171def3
GB
1002 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1003 (i386_dr_low_can_set_control): Likewise.
1004 (i386_get_debug_register_length): Likewise.
1005 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1006 (i386_dr_low_can_set_control): Likewise.
1007 (i386_get_debug_register_length): Likewise.
1008
10092014-06-17 Gary Benson <gbenson@redhat.com>
1010
b9228891
GB
1011 * i386-low.h (i386-dregs.h): New include.
1012 (DR_FIRSTADDR): Now in i386-dregs.h.
1013 (DR_LASTADDR): Likewise.
1014 (DR_NADDR): Likewise.
1015 (DR_STATUS): Likewise.
1016 (DR_CONTROL): Likewise.
1017 (i386_debug_reg_state): Likewise.
1018 (i386_dr_insert_watchpoint): Likewise.
1019 (i386_dr_remove_watchpoint): Likewise.
1020 (i386_dr_region_ok_for_watchpoint): Likewise.
1021 (i386_dr_stopped_data_address): Likewise.
1022 (i386_dr_stopped_by_watchpoint): Likewise.
1023 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1024
4be83cc2
GB
10252014-06-18 Gary Benson <gbenson@redhat.com>
1026
1027 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1028 i386_dr_insert_watchpoint.
1029 (i386_low_remove_watchpoint): Renamed to
1030 i386_dr_remove_watchpoint.
1031 (i386_low_region_ok_for_watchpoint): Renamed to
1032 i386_dr_region_ok_for_watchpoint.
1033 (i386_low_stopped_data_address): Renamed to
1034 i386_dr_stopped_data_address.
1035 (i386_low_stopped_by_watchpoint): Renamed to
1036 i386_dr_stopped_by_watchpoint.
1037 * i386-low.c (i386_show_dr): Renamed to
1038 i386_dr_show and made nonstatic. All uses updated.
1039 (i386_length_and_rw_bits): Renamed to
1040 i386_dr_length_and_rw_bits and made nonstatic.
1041 All uses updated.
1042 (i386_insert_aligned_watchpoint): Renamed to
1043 i386_dr_insert_aligned_watchpoint and made nonstatic.
1044 All uses updated.
1045 (i386_remove_aligned_watchpoint): Renamed to
1046 i386_dr_remove_aligned_watchpoint and made nonstatic.
1047 All uses updated.
1048 (i386_update_inferior_debug_regs): Renamed to
1049 i386_dr_update_inferior_debug_regs and made nonstatic.
1050 All uses updated.
1051 (i386_low_insert_watchpoint): Renamed to
1052 i386_dr_insert_watchpoint. All uses updated.
1053 (i386_low_remove_watchpoint): Renamed to
1054 i386_dr_remove_watchpoint. All uses updated.
1055 (i386_low_region_ok_for_watchpoint): Renamed to
1056 i386_dr_region_ok_for_watchpoint. All uses updated.
1057 (i386_low_stopped_data_address): Renamed to
1058 i386_dr_stopped_data_address. All uses updated.
1059 (i386_low_stopped_by_watchpoint): Renamed to
1060 i386_dr_stopped_by_watchpoint. All uses updated.
1061
131aa0d4
GB
10622014-06-18 Gary Benson <gbenson@redhat.com>
1063
1064 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1065 (i386_dr_low_can_set_control): Likewise.
1066 (i386_insert_aligned_watchpoint): New check.
1067
d9305f7f
GB
10682014-06-18 Gary Benson <gbenson@redhat.com>
1069
1070 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1071 Renamed to state.
1072
e927c9fc
GB
10732014-06-18 Gary Benson <gbenson@redhat.com>
1074
1075 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1076 instead of fatal and error.
1077 (i386_handle_nonaligned_watchpoint): Likewise.
1078
1b6d4134
GB
10792014-06-18 Gary Benson <gbenson@redhat.com>
1080
1081 * i386-low.c (i386_get_debug_register_length): New macro.
1082 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1083 (i386_show_dr): Use debug_printf instead of fprintf. Use
1084 phex to format values.
1085
6e62758f
GB
10862014-06-18 Gary Benson <gbenson@redhat.com>
1087
1088 * i386-low.h: Comment changes.
1089 * i386-low.c: Likewise.
1090
fc6e2f03
GB
10912014-06-18 Gary Benson <gbenson@redhat.com>
1092
1093 * i386-low.c: Whitespace changes.
1094
f9d1eeed
TT
10952014-06-12 Tom Tromey <tromey@redhat.com>
1096
1097 * utils.c (freeargv): Remove.
1098
0b04e523
TT
10992014-06-12 Tom Tromey <tromey@redhat.com>
1100
1101 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1102 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1103 (parse_debug_format_options): Likewise.
1104 (gdbserver_usage): Likewise.
1105 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1106 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1107 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1108 against libiberty.
1109 ($(LIBGNU)): Depend on libiberty.
1110 (all-lib): Recurse into all subdirs.
1111 (install-only): Invoke "install" target in subdirs.
1112 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1113 targets.
1114 * configure: Rebuild.
1115 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1116 for vasprintf, vsnprintf, or gettimeofday.
1117 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1118 srv_tgtobj.
1119
270c9937
JB
11202014-06-05 Joel Brobecker <brobecker@adacore.com>
1121
1122 * development.sh: Delete.
1123 * Makefile.in (config.status): Adjust dependency on development.sh.
1124 * configure.ac: Adjust development.sh source call.
1125 * configure: Regenerate.
1126
0a261ed8
PA
11272014-06-02 Pedro Alves <palves@redhat.com>
1128
1129 * ax.c (gdb_free_agent_expr): New function.
1130 * ax.h (gdb_free_agent_expr): New declaration.
1131 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1132 list.
1133 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1134 static.
1135 (clear_breakpoint_conditions_and_commands): New function.
1136 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1137 (clear_breakpoint_conditions_and_commands): New declaration.
1138
e9dae05e
RR
11392014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1140
1141 * linux-aarch64-low.c (asm/ptrace.h): Include.
1142
5876f503
JK
11432014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1144
1145 Fix TLS access for -static -pthread.
1146 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1147 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1148 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1149
802e8e6d
PA
11502014-05-20 Pedro Alves <palves@redhat.com>
1151
1152 * linux-aarch64-low.c (aarch64_insert_point)
1153 (aarch64_remove_point): No longer check whether the type is
1154 supported here. Adjust to new interface.
1155 (the_low_target): Install aarch64_supports_z_point_type as
1156 supports_z_point_type method.
1157 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1158 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1159 instead of a Z packet char. Adjust.
1160 (arm_supports_z_point_type): New function.
1161 (arm_insert_point, arm_remove_point): Adjust to new interface.
1162 (the_low_target): Install arm_supports_z_point_type.
1163 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1164 (cris_insert_point, cris_remove_point): Adjust to new interface.
1165 Don't check whether the type is supported here.
1166 (the_low_target): Install cris_supports_z_point_type.
1167 * linux-low.c (linux_supports_z_point_type): New function.
1168 (linux_insert_point, linux_remove_point): Adjust to new interface.
1169 * linux-low.h (struct linux_target_ops) <insert_point,
1170 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1171 raw_breakpoint pointer parameter.
1172 <supports_z_point_type>: New method.
1173 * linux-mips-low.c (mips_supports_z_point_type): New function.
1174 (mips_insert_point, mips_remove_point): Adjust to new interface.
1175 Use mips_supports_z_point_type.
1176 (the_low_target): Install mips_supports_z_point_type.
1177 * linux-ppc-low.c (the_low_target): Install NULL as
1178 supports_z_point_type method.
1179 * linux-s390-low.c (the_low_target): Install NULL as
1180 supports_z_point_type method.
1181 * linux-sparc-low.c (the_low_target): Install NULL as
1182 supports_z_point_type method.
1183 * linux-x86-low.c (x86_supports_z_point_type): New function.
1184 (x86_insert_point): Adjust to new insert_point interface. Use
1185 insert_memory_breakpoint. Adjust to new
1186 i386_low_insert_watchpoint interface.
1187 (x86_remove_point): Adjust to remove_point interface. Use
1188 remove_memory_breakpoint. Adjust to new
1189 i386_low_remove_watchpoint interface.
1190 (the_low_target): Install x86_supports_z_point_type.
1191 * lynx-low.c (lynx_target_ops): Install NULL as
1192 supports_z_point_type callback.
1193 * nto-low.c (nto_supports_z_point_type): New.
1194 (nto_insert_point, nto_remove_point): Adjust to new interface.
1195 (nto_target_ops): Install nto_supports_z_point_type.
1196 * mem-break.c: Adjust intro comment.
1197 (struct raw_breakpoint) <raw_type, size>: New fields.
1198 <inserted>: Update comment.
1199 <shlib_disabled>: Delete field.
1200 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1201 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1202 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1203 (raw_bkpt_type_to_target_hw_bp_type): New function.
1204 (find_enabled_raw_code_breakpoint_at): New function.
1205 (find_raw_breakpoint_at): New type and size parameters. Use them.
1206 (insert_memory_breakpoint): New function, based off
1207 set_raw_breakpoint_at.
1208 (remove_memory_breakpoint): New function.
1209 (set_raw_breakpoint_at): Reimplement.
1210 (set_breakpoint): New, based on set_breakpoint_at.
1211 (set_breakpoint_at): Reimplement.
1212 (delete_raw_breakpoint): Go through the_target->remove_point
1213 instead of assuming memory breakpoints.
1214 (find_gdb_breakpoint_at): Delete.
1215 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1216 (find_gdb_breakpoint): New function.
1217 (set_gdb_breakpoint_at): Delete.
1218 (z_type_supported): New function.
1219 (set_gdb_breakpoint_1): New function, loosely based off
1220 set_gdb_breakpoint_at.
1221 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1222 (delete_gdb_breakpoint_at): Delete.
1223 (delete_gdb_breakpoint_1): New function, loosely based off
1224 delete_gdb_breakpoint_at.
1225 (delete_gdb_breakpoint): New function.
1226 (clear_gdb_breakpoint_conditions): Rename to ...
1227 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1228 breakpoint.
1229 (add_condition_to_breakpoint): Make static.
1230 (add_breakpoint_condition): Take a struct breakpoint pointer
1231 instead of an address. Adjust.
1232 (gdb_condition_true_at_breakpoint): Rename to ...
1233 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1234 z_type parameter.
1235 (gdb_condition_true_at_breakpoint): Reimplement.
1236 (add_breakpoint_commands): Take a struct breakpoint pointer
1237 instead of an address. Adjust.
1238 (gdb_no_commands_at_breakpoint): Rename to ...
1239 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1240 parameter. Return true if no breakpoint was found. Change debug
1241 output.
1242 (gdb_no_commands_at_breakpoint): Reimplement.
1243 (run_breakpoint_commands): Rename to ...
1244 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1245 and change return type to boolean.
1246 (run_breakpoint_commands): New function.
1247 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1248 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1249 breakpoint. Go through the_target->remove_point instead of
1250 assuming memory breakpoint.
1251 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1252 software and hardware breakpoints.
1253 (reinsert_raw_breakpoint): Go through the_target->insert_point
1254 instead of assuming memory breakpoint.
1255 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1256 software and hardware breakpoints.
1257 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1258 Check both software and hardware breakpoints.
1259 (validate_inserted_breakpoint): Assert the breakpoint is a
1260 software breakpoint. Set the inserted flag to -1 instead of
1261 setting shlib_disabled.
1262 (delete_disabled_breakpoints): Adjust.
1263 (validate_breakpoints): Only validate software breakpoints.
1264 Adjust to inserted flag change.
1265 (check_mem_read, check_mem_write): Skip breakpoint types other
1266 than software breakpoints. Adjust to inserted flag change.
1267 * mem-break.h (enum raw_bkpt_type): New enum.
1268 (raw_breakpoint, struct process_info): Forward declare.
1269 (Z_packet_to_target_hw_bp_type): Delete declaration.
1270 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1271 (set_gdb_breakpoint, delete_gdb_breakpoint)
1272 (clear_breakpoint_conditions): New declarations.
1273 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1274 (breakpoint_inserted_here): Update comment.
1275 (add_breakpoint_condition, add_breakpoint_commands): Replace
1276 address parameter with a breakpoint pointer parameter.
1277 (gdb_breakpoint_here): Update comment.
1278 (delete_gdb_breakpoint_at): Delete.
1279 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1280 * server.c (process_point_options): Take a struct breakpoint
1281 pointer instead of an address. Adjust.
1282 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1283 delete_gdb_breakpoint.
1284 * spu-low.c (spu_target_ops): Install NULL as
1285 supports_z_point_type method.
1286 * target.h: Include mem-break.h.
1287 (struct target_ops) <prepare_to_access_memory>: Update comment.
1288 <supports_z_point_type>: New field.
1289 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1290 instead of a char. Also take a raw breakpoint pointer.
1291 * win32-arm-low.c (the_low_target): Install NULL as
1292 supports_z_point_type.
1293 * win32-i386-low.c (i386_supports_z_point_type): New function.
1294 (i386_insert_point, i386_remove_point): Adjust to new interface.
1295 (the_low_target): Install i386_supports_z_point_type.
1296 * win32-low.c (win32_supports_z_point_type): New function.
1297 (win32_insert_point, win32_remove_point): Adjust to new interface.
1298 (win32_target_ops): Install win32_supports_z_point_type.
1299 * win32-low.h (struct win32_target_ops):
1300 <supports_z_point_type>: New method.
1301 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1302 instead of a char. Also take a raw breakpoint pointer.
1303
932539e3
PA
13042014-05-20 Pedro Alves <palves@redhat.com>
1305
1306 * mem-break.h: Include break-common.h.
1307 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1308 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1309 (Z_packet_to_target_hw_bp_type): New declaration.
1310 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1311 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1312 (Z_PACKET_ACCESS_WP): Delete macros.
1313 (Z_packet_to_hw_type): Delete function.
1314 * i386-low.h: Don't include break-common.h here.
1315 (Z_packet_to_hw_type): Delete declaration.
1316 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1317 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1318 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1319 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1320 * linux-aarch64-low.c: Don't include break-common.h here.
1321 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1322 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1323 (Z_packet_to_target_hw_bp_type): Delete function.
1324 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1325 function.
1326 (mips_insert_point, mips_remove_point): Use
1327 Z_packet_to_target_hw_bp_type.
1328
4ff0d3d8
PA
13292014-05-20 Pedro Alves <palves@redhat.com>
1330
1331 * linux-aarch64-low.c: Include break-common.h.
1332 (enum target_point_type): Delete.
1333 (Z_packet_to_point_type): Rename to ...
1334 (Z_packet_to_target_hw_bp_type): ... this, and return a
1335 target_hw_bp_type instead.
1336 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1337 instead of an enum target_point_type.
1338 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1339 breakpoint type.
1340 (aarch64_dr_state_insert_one_point)
1341 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1342 (aarch64_handle_aligned_watchpoint)
1343 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1344 Take an enum target_hw_bp_type instead of an enum
1345 target_point_type.
1346 (aarch64_supports_z_point_type): New function.
1347 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1348 use Z_packet_to_target_hw_bp_type.
1349
786dc519
JB
13502014-05-20 Joel Brobecker <brobecker@adacore.com>
1351
1352 * configure.ac: Only use -Werror by default when DEVELOPMENT
1353 is true.
1354 * configure: Regenerate.
1355
9e0aa64f
JK
13562014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1357
1358 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1359 * linux-x86-low.c (X86_64_USER_REGS): New.
1360 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1361
2b577b92
YQ
13622014-04-28 Yao Qi <yao@codesourcery.com>
1363
1364 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1365 name.
1366
94611da2
PA
13672014-04-25 Pedro Alves <palves@redhat.com>
1368
1369 PR server/16255
1370 * linux-low.c (linux_attach_fail_reason_string): New function.
1371 (linux_attach_lwp): Delete.
1372 (linux_attach_lwp_1): Rename to ...
1373 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1374 argument. Remove "initial" parameter. Return int instead of
1375 void. Don't error or warn here.
1376 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1377 failure to attach to the tgid. Call warning when failing to
1378 attach to an lwp.
1379 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1380 argument. Remove "initial" parameter. Return int instead of
1381 void. Don't error or warn here.
1382 (linux_attach_fail_reason_string): New declaration.
1383 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1384 interface change. Use linux_attach_fail_reason_string.
1385
01f9f808
MS
13862014-04-24 Michael Sturm <michael.sturm@mintel.com>
1387 Walfred Tedeschi <walfred.tedeschi@intel.com>
1388
1389 * Makefile.in: Added rules to handle new files
1390 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1391 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1392 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1393 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1394 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1395 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1396 x32-avx512-linux.o.
1397 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1398 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1399 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1400 i386/x32-avx512.xml.
1401 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1402 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1403 i386/x32-avx512-linux.xml.
1404 * i387-fp.c (num_avx512_k_registers): New constant for number
1405 of K registers.
1406 (num_avx512_zmmh_low_registers): New constant for number of
1407 lower ZMM registers (0-15).
1408 (num_avx512_zmmh_high_registers): New constant for number of
1409 higher ZMM registers (16-31).
1410 (num_avx512_ymmh_registers): New contant for number of higher
1411 YMM registers (ymm16-31 added by avx521 on x86_64).
1412 (num_avx512_xmm_registers): New constant for number of higher
1413 XMM registers (xmm16-31 added by AVX512 on x86_64).
1414 (struct i387_xsave): Add space for AVX512 registers.
1415 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1416 Add code to handle AVX512 registers.
1417 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1418 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1419 prototypei from generated file.
1420 (tdesc_amd64_avx512_linux): Likewise.
1421 (init_registers_x32_avx512_linux): Likewise.
1422 (tdesc_x32_avx512_linux): Likewise.
1423 (init_registers_i386_avx512_linux): Likewise.
1424 (tdesc_i386_avx512_linux): Likewise.
1425 (x86_64_regmap): Add AVX512 registers.
1426 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1427 mask.
1428 (initialize_low_arch): Add code to initialize AVX512 registers.
1429
51aa91f9
PA
14302014-04-23 Pedro Alves <palves@redhat.com>
1431
1432 * mem-break.c (find_gdb_breakpoint_at): Make static.
1433 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1434
a4165e94
PA
14352014-04-23 Pedro Alves <palves@redhat.com>
1436
1437 * i386-low.c: Don't include break-common.h here.
1438 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1439 prototype to take target_hw_bp_type as argument instead of a Z
1440 packet char.
1441 * i386-low.h: Include break-common.h here.
1442 (Z_packet_to_hw_type): Declare.
1443 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1444 prototypes.
1445 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1446 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1447 (x86_remove_point): Convert the packet number to a
1448 target_hw_bp_type before calling i386_low_remove_watchpoint.
1449 * win32-i386-low.c (i386_insert_point): Convert the packet number
1450 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1451 (i386_remove_point): Convert the packet number to a
1452 target_hw_bp_type before calling i386_low_remove_watchpoint.
1453
b8acf843
PA
14542014-04-23 Pedro Alves <palves@redhat.com>
1455
1456 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1457
d708bcd1
PA
14582014-04-10 Pedro Alves <palves@redhat.com>
1459
1460 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1461 Check if the condition or command is NULL before checking if the
1462 breakpoint is known. On success, return true.
1463 * mem-break.h (add_breakpoint_condition): Document return.
1464 (add_breakpoint_commands): Add describing comment.
1465 * server.c (skip_to_semicolon): New function.
1466 (process_point_options): Use it.
1467
2eec7d5b
PA
14682014-04-09 Pedro Alves <palves@redhat.com>
1469
1470 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1471 to lwpid_of.
1472
fa96cb38
PA
14732014-02-27 Pedro Alves <palves@redhat.com>
1474
1475 PR 12702
1476 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1477 macros.
1478 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1479 output.
1480 (last_thread_of_process_p): Take a PID argument instead of a
1481 thread pointer.
1482 (linux_wait_for_lwp): Delete.
1483 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1484 functions.
1485 (linux_low_filter_event): New function, party factored out from
1486 linux_wait_for_event.
1487 (linux_wait_for_event): Rename to ...
1488 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1489 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1490 sigsuspend. Check for zombie leaders.
1491 (linux_wait_for_event): Reimplement as wrapper around
1492 linux_wait_for_event_filtered.
1493 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1494 a normal or signal exit is seen, it's the whole process exiting.
1495 (wait_for_sigstop): No longer a for_each_inferior callback.
1496 Rewrite on top of linux_wait_for_event_filtered.
1497 (stop_all_lwps): Call wait_for_sigstop directly.
1498 * server.c (resume, handle_target_event): Handle
1499 TARGET_WAITKIND_NO_RESUMED.
1500
d763de10
JB
15012014-02-26 Joel Brobecker <brobecker@adacore.com>
1502
1503 * win32-low.c (psapi_get_dll_name,
1504 * win32_CreateToolhelp32Snapshot): Delete.
1505 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1506 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1507 Delete.
1508 (handle_load_dll): Add function description.
1509 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1510
850a0f76
JB
15112014-02-26 Joel Brobecker <brobecker@adacore.com>
1512
1513 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1514 Add comment.
1515 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1516 base address when calling win32_add_one_solib.
1517 (handle_load_dll): Delete local variable load_addr.
1518 Remove 0x1000 offset applied to DLL base address when calling
1519 win32_add_one_solib.
1520 (handle_unload_dll): Add comment.
1521
f25b3fc3
JB
15222014-02-26 Joel Brobecker <brobecker@adacore.com>
1523
1524 * win32-low.c (win32_add_all_dlls): Renames
1525 win32_ensure_ntdll_loaded. Rewrite function documentation.
1526 Adjust implementation to always load all DLLs.
1527 Add 0x1000 offset to DLL base address when calling
1528 win32_add_one_solib.
1529 (child_initialization_done): New static global.
1530 (do_initial_child_stuff): Set child_initialization_done to
1531 zero during child initialization, and 1 after. Replace call
1532 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1533 Add comment.
1534 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1535 (handle_unload_dll): Add function documentation.
1536 (get_child_debug_event): Ignore load and unload DLL events
1537 during child initialization.
1538
d86d4aaf
DE
15392014-02-20 Doug Evans <dje@google.com>
1540
3bc32da3 1541 Remove global all_lwps.
d86d4aaf
DE
1542 * inferiors.h (ptid_of): Move here from linux-low.h.
1543 (pid_of, lwpid_of): Ditto.
1544 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1545 parameter is a struct thread_info * now.
1546 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1547 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1548 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1549 directly.
1550 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1551 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1552 * linux-arm-low.c (update_registers_callback): Update, "entry"
1553 parameter is a struct thread_info * now.
1554 Fetch lwpid from current_inferior directly.
1555 (arm_insert_point): Pass &all_threads to find_inferior instead of
1556 &all_lwps.
1557 (arm_remove_point): Ditto.
1558 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1559 (arm_prepare_to_resume): Fetch pid from thread.
1560 (arm_read_description): Fetch lwpid from current_inferior directly.
1561 * linux-low.c (all_lwps): Delete.
1562 (delete_lwp): Delete call to remove_inferior.
1563 (handle_extended_wait): Fetch lwpid from thread.
1564 (add_lwp): Don't set lwp->entry.id. Remove call to
1565 add_inferior_to_list.
1566 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1567 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1568 (kill_one_lwp_callback): Ditto.
1569 (linux_kill): Don't dereference NULL pointer.
1570 Fetch ptid,lwpid from thread.
1571 (get_detach_signal): Fetch ptid from thread.
1572 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1573 Simplify call to regcache_invalidate_thread.
1574 (delete_lwp_callback): Update, "entry" parameter is a
1575 struct thread_info * now. Fetch pid from thread.
1576 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1577 (status_pending_p_callback): Update, "entry" parameter is a
1578 struct thread_info * now. Fetch ptid from thread.
1579 (find_lwp_pid): Update, "entry" parameter is a
1580 struct thread_info * now.
1581 (linux_wait_for_lwp): Fetch pid from thread.
1582 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1583 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1584 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1585 (dequeue_one_deferred_signal): Ditto.
1586 (cancel_breakpoint): Fetch ptid from current_inferior.
1587 (linux_wait_for_event): Pass &all_threads to find_inferior,
1588 not &all_lwps. Fetch ptid, lwpid from thread.
1589 (count_events_callback): Update, "entry" parameter is a
1590 struct thread_info * now.
1591 (select_singlestep_lwp_callback): Ditto.
1592 (select_event_lwp_callback): Ditto.
1593 (cancel_breakpoints_callback): Ditto.
1594 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1595 not &all_lwps.
1596 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1597 (unsuspend_one_lwp): Update, "entry" parameter is a
1598 struct thread_info * now.
1599 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1600 not &all_lwps.
1601 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1602 Fetch lwpid from thread, not lwp.
1603 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1604 Pass &all_threads to find_inferior, not &all_lwps.
1605 (send_sigstop): Fetch lwpid from thread, not lwp.
1606 (send_sigstop_callback): Update, "entry" parameter is a
1607 struct thread_info * now.
1608 (suspend_and_send_sigstop_callback): Ditto.
1609 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1610 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1611 struct thread_info * now.
1612 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1613 from thread, lwp.
1614 (lwp_running): Update, "entry" parameter is a
1615 struct thread_info * now.
1616 (stop_all_lwps): Fetch ptid from thread.
1617 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1618 (linux_resume_one_lwp): Fetch lwpid from thread.
1619 (linux_set_resume_request): Update, "entry" parameter is a
1620 struct thread_info * now. Fetch pid, lwpid from thread.
1621 (resume_status_pending_p): Update, "entry" parameter is a
1622 struct thread_info * now.
1623 (need_step_over_p): Ditto. Fetch lwpid from thread.
1624 (start_step_over): Fetch lwpid from thread.
1625 (linux_resume_one_thread): Update, "entry" parameter is a
1626 struct thread_info * now. Fetch lwpid from thread.
1627 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1628 (proceed_one_lwp): Update, "entry" parameter is a
1629 struct thread_info * now. Fetch lwpid from thread.
1630 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1631 struct thread_info * now.
1632 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1633 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1634 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1635 directly.
1636 (regsets_store_inferior_registers): Ditto.
1637 (fetch_register, store_register): Ditto.
1638 (linux_read_memory, linux_write_memory): Ditto.
1639 (linux_request_interrupt): Ditto.
1640 (linux_read_auxv): Ditto.
1641 (linux_xfer_siginfo): Ditto.
1642 (linux_qxfer_spu): Ditto.
1643 (linux_qxfer_libraries_svr4): Ditto.
1644 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1645 moved to inferiors.h.
1646 (get_lwp): Delete.
1647 (get_thread_lwp): Update.
1648 (struct lwp_info): Delete member "entry". Simplify comment for
1649 member "thread".
1650 (all_lwps): Delete.
1651 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1652 current_inferior directly.
1653 (update_watch_registers_callback): Update, "entry" parameter is a
1654 struct thread_info * now. Fetch pid from thread.
1655 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1656 (mips_insert_point): Fetch lwpid from current_inferior.
1657 Pass &all_threads to find_inferior, not &all_lwps.
1658 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1659 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1660 directly.
1661 (mips_stopped_data_address): Ditto.
1662 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1663 directly.
1664 * linux-tile-low.c (tile_arch_setup): Ditto.
1665 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1666 (update_debug_registers_callback): Update, "entry" parameter is a
1667 struct thread_info * now. Fetch pid from thread.
1668 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1669 Pass &all_threads to find_inferior, not &all_lwps.
1670 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1671 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1672 Pass &all_threads to find_inferior, not &all_lwps.
1673 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1674 (i386_dr_low_get_status): Ditto.
1675 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1676 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1677 (x86_linux_read_description): Ditto.
1678 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1679
3b8361aa
DE
16802014-02-20 Doug Evans <dje@google.com>
1681
1682 * inferiors.c (get_first_inferior): Fix buglet.
1683
f7667f0d
DE
16842014-02-19 Doug Evans <dje@google.com>
1685
1686 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1687 * inferiors.c (add_thread): Change result type to struct thread_info *.
1688 All callers updated.
1689 (add_lwp): Call add_thread here instead of in callers.
1690 All callers updated.
1691 * linux-low.h (get_lwp_thread): Rewrite.
1692 (struct lwp_info): New member "thread".
1693
b3312d80
DE
16942014-02-19 Doug Evans <dje@google.com>
1695
1696 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1697 All callers updated.
1698
ecc6f45c
DE
16992014-02-19 Doug Evans <dje@google.com>
1700
1701 * inferiors.c (add_thread): Fix whitespace.
1702
649ebbca
DE
17032014-02-19 Doug Evans <dje@google.com>
1704
1705 * dll.c (clear_dlls): Replace accessing list implemention details
1706 with API function.
1707 * gdbthread.h (get_first_thread): Declare.
1708 * inferiors.c (for_each_inferior_with_data): New function.
1709 (get_first_thread): New function.
1710 (find_thread_ptid): Simplify.
1711 (get_first_inferior): New function.
1712 (clear_list): Delete.
1713 (one_inferior_p): New function.
1714 (clear_inferior_list): New function.
1715 (clear_inferiors): Update.
1716 * inferiors.h (for_each_inferior_with_data): Declare.
1717 (clear_inferior_list): Declare.
1718 (one_inferior_p): Declare.
1719 (get_first_inferior): Declare.
1720 * linux-low.c (linux_wait_for_event): Replace accessing list
1721 implemention details with API function.
1722 * server.c (target_running): Ditto.
1723 (accumulate_file_name_length): New function.
1724 (emit_dll_description): New function.
1725 (handle_qxfer_libraries): Replace accessing list implemention
1726 details with API function.
1727 (handle_qxfer_threads_worker): New function.
1728 (handle_qxfer_threads_proper): Replace accessing list implemention
1729 details with API function.
1730 (handle_query): Ditto.
1731 (visit_actioned_threads_callback_ftype): New typedef.
1732 (visit_actioned_threads_data): New struct.
1733 (visit_actioned_threads): Rewrite to be find_inferior callback.
1734 (resume): Call find_inferior.
1735 (handle_status): Replace accessing list implemention
1736 details with API function.
1737 (process_serial_event): Replace accessing list implemention details
1738 with API function.
1739 * target.c (set_desired_inferior): Replace accessing list implemention
1740 details with API function.
1741 * tracepoint.c (same_process_p): New function.
1742 (gdb_agent_about_to_close): Replace accessing list implemention
1743 details with API function.
1744 * win32-low.c (child_delete_thread): Replace accessing list
1745 implemention details with API function.
1746 (match_dll_by_basename): New function.
1747 (dll_is_loaded_by_basename): New function.
1748 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1749 details call to dll_is_loaded_by_basename.
1750
80894984
DE
17512014-02-19 Doug Evans <dje@google.com>
1752
1753 * dll.h (struct dll_info): Add comment.
1754 * gdbthread.h (struct thread_info): Add comment.
1755 (current_ptid): Simplify.
1756 * inferiors.c (add_process): Update.
1757 (remove_process): Update.
1758 * inferiors.h (struct process_info): Rename member "head" to "entry".
1759 * linux-low.c (delete_lwp): Update.
1760 (add_lwp): Update.
1761 (last_thread_of_process_p): Update.
1762 (kill_one_lwp_callback, linux_kill): Update.
1763 (status_pending_p_callback): Update.
1764 (wait_for_sigstop): Update. Simplify read of ptid.
1765 (start_step_over): Update.
1766 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1767 (get_lwp_thread): Update.
1768 (struct lwp_info): Rename member "head" to "entry".
1769 * regcache.h (inferior_list_entry): Delete.
1770 * server.c (kill_inferior_callback): Update.
1771 (detach_or_kill_inferior_callback): Update.
1772 (print_started_pid): Update.
1773 (print_attached_pid): Update.
1774 (process_serial_event): Simplify read of ptid.
1775 * thread-db.c (thread_db_create_event): Update.
1776 (thread_db_get_tls_address): Update.
1777 * win32-low.c (current_inferior_ptid): Simplify.
1778
46917d26
TT
17792014-02-19 Tom Tromey <tromey@redhat.com>
1780
1781 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1782 argument.
1783 (target_supports_btrace): Update.
1784
0759a81e
YQ
17852014-02-14 Yao Qi <yao@codesourcery.com>
1786
1787 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1788 (rsp-low-ipa.o): New target.
1789
a7191e8b
TT
17902014-02-12 Tom Tromey <tromey@redhat.com>
1791
1792 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1793 convert_ascii_to_int.
1794 * regcache.c (registers_to_string): Likewise.
1795 * remote-utils.c (decode_M_packet): Likewise.
1796 * server.c (process_serial_event): Likewise.
1797
ff0e980e
TT
17982014-02-12 Tom Tromey <tromey@redhat.com>
1799
1800 * server.c (handle_query, handle_v_run): Use hex2bin, not
1801 unhexify.
1802 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1803
e9371aff
TT
18042014-02-12 Tom Tromey <tromey@redhat.com>
1805
1806 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1807 convert_int_to_ascii.
1808 * regcache.c (registers_to_string, collect_register_as_string):
1809 Likewise.
1810 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1811 Likewise.
1812 * server.c (process_serial_event): Likewise.
1813 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1814 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1815
971dc0b8
TT
18162014-02-12 Tom Tromey <tromey@redhat.com>
1817
1818 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1819 bin2hex, not hexify.
1820 * tracepoint.c (cmd_qtstatus): Likewise.
1821
0a822afb
TT
18222014-02-12 Tom Tromey <tromey@redhat.com>
1823
1824 * remote-utils.c (monitor_output): Pass explicit length to
1825 hexify.
1826
9c3d6531
TT
18272014-02-12 Tom Tromey <tromey@redhat.com>
1828
1829 * tracepoint.c: Include rsp-low.h.
1830 * server.c: Include rsp-low.h.
1831 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1832 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1833 declare.
1834 * remote-utils.c: Include rsp-low.h.
1835 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1836 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1837 (convert_int_to_ascii, convert_ascii_to_int): Move to
1838 common/rsp-low.c.
1839 * regcache.c: Include rsp-low.h.
1840 * ax.c: Include rsp-low.h.
1841 * Makefile.in (SFILES): Add common/rsp-low.c.
1842 (OBS): Add rsp-low.o.
1843 (rsp-low.o): New target.
1844
01fd3ea5
TT
18452014-02-12 Tom Tromey <tromey@redhat.com>
1846
1847 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1848 Include print-utils.h.
1849 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1850 (plongest, thirty_two, phex_nz): Remove.
1851 * Makefile.in (SFILES): Add common/print-utils.c.
1852 (OBS): Add print-utils.o.
1853 (print-utils-ipa.o): New target.
1854 (print-utils.o): New target.
1855 (IPA_OBJS): Add print-utils-ipa.o.
1856
e99dc820
TT
18572014-02-06 Tom Tromey <tromey@redhat.com>
1858
1859 * Makefile.in (SFILES): Fix indentation.
1860
ee1e2d4f
DE
18612014-02-05 Doug Evans <dje@google.com>
1862
1863 * linux-low.c (linux_wait_for_event): Improve comment.
1864 (linux_wait_1): Keep current_inferior in sync with event_child.
1865
f5a02773
DE
18662014-01-22 Doug Evans <dje@google.com>
1867
1868 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1869
87ce2a04
DE
18702014-01-22 Doug Evans <dje@google.com>
1871
1872 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1873 * configure: Regenerate.
1874 * config.in: Regenerate.
1875 * Makefile.in (SFILES): Add debug.c.
1876 (OBS): Add debug.o.
1877 * debug.c: New file.
1878 * debug.h: New file.
1879 * linux-aarch64-low.c (*): Update all debugging printfs to use
1880 debug_printf instead of fprintf.
1881 * linux-arm-low.c (*): Ditto.
1882 * linux-cris-low.c (*): Ditto.
1883 * linux-crisv32-low.c (*): Ditto.
1884 * linux-m32r-low.c (*): Ditto.
1885 * linux-sparc-low.c (*): Ditto.
1886 * linux-x86.c (*): Ditto.
1887 * linux-low.c (*): Ditto.
1888 (linux_wait_1): Add calls to debug_enter, debug_exit.
1889 (linux_wait): Remove redundant debugging printf.
1890 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1891 (linux_resume, unstop_all_lwps): Ditto.
1892 * mem-break.c (*): Update all debugging printfs to use
1893 debug_printf instead of fprintf.
1894 * remote-utils.c (*): Ditto.
1895 * thread-db.c (*): Ditto.
1896 * server.c #include <ctype.h>, "gdb_vecs.h".
1897 (debug_threads): Moved to debug.c.
1898 (*): Update all debugging printfs to use debug_printf instead of
1899 fprintf.
1900 (start_inferior): Replace call to fflush with call to debug_flush.
1901 (monitor_show_help): Mention set debug-format.
1902 (parse_debug_format_options): New function.
1903 (handle_monitor_command): Handle "monitor set debug-format".
1904 (gdbserver_usage): Mention --debug-format.
1905 (main): Parse --debug-format.
1906 * server.h (debug_threads): Declaration moved to debug.h.
1907 #include "debug.h".
1908 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1909 trace_debug_1 that uses debug_printf.
1910 (tracepoint_look_up_symbols): Update all debugging printfs to use
1911 debug_printf instead of fprintf.
1912
e671835b
BS
19132014-01-20 Baruch Siach <baruch@tkos.co.il>
1914
1915 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1916 sys/ptrace.h.
1917
b5737fa9
PA
19182014-01-17 Pedro Alves <palves@redhat.com>
1919
ea38d2a9 1920 PR build/16445
c7faa97a
PA
1921 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1922 defined after including gdb_proc_service.h.
b5737fa9 1923
40ed484e
DE
19242014-01-16 Doug Evans <dje@google.com>
1925
1926 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1927 (match_dll): Use it.
1928
969c39fb
MM
19292014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1930
1931 * target.h (target_ops) <read_btrace>: Change parameters and
1932 return type to allow error reporting.
1933 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1934 trace reading errors on.
1935 * linux-low.c (linux_low_read_btrace): Pass trace reading
1936 errors on.
1937 (linux_low_disable_btrace): New.
1938
ab7f45ba
DE
19392014-01-15 Doug Evans <dje@google.com>
1940
1941 * inferiors.c (thread_id_to_gdb_id): Delete.
1942 * inferiors.h (thread_id_to_gdb_id): Delete.
1943
66af0f44
EZ
19442014-01-13 Eli Zaretskii <eliz@gnu.org>
1945
1946 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1947 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1948 versions.
1949
9939e131
PA
19502014-01-08 Pedro Alves <palves@redhat.com>
1951
1952 * server.c (handle_status): Don't discard previous queued stop
1953 replies or thread's pending status here.
1954 (main) <disconnection>: Do it here instead.
1955
b7ea362b
PA
19562014-01-08 Pedro Alves <palves@redhat.com>
1957
1958 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1959 * server.c (visit_actioned_threads, handle_pending_status): New
1960 function.
1961 (handle_v_cont): Factor out parts to ...
1962 (resume): ... this new function. If in all-stop, and a thread
1963 being resumed has a pending status, report it without actually
1964 resuming.
1965 (myresume): Adjust to use the new 'resume' function.
1966 (clear_pending_status_callback, set_pending_status_callback)
1967 (find_status_pending_thread_callback): New functions.
1968 (handle_status): Handle the case of multiple threads having
1969 interesting statuses to report. Report threads' real last signal
1970 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1971 with an interesting thread to report the status for, instead of
1972 always reporting the status of the first thread.
1973
28498c42
JB
19742014-01-01 Joel Brobecker <brobecker@adacore.com>
1975
1976 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1977 * gdbreplay.c (gdbreplay_version): Likewise.
1978
f45c82da
YZ
19792013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1980
1981 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1982 iov.iov_len with the real length in use.
1983
379a5e2d
JB
19842013-12-13 Joel Brobecker <brobecker@adacore.com>
1985
1986 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1987 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1988 for all targets that use win32-low.c.
1989 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1990 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1991
4210d83e
PA
19922013-12-13 Pedro Alves <palves@redhat.com>
1993
1994 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1995 if equal to TARGET_WAITKIND_LOADED.
1996 * win32-low.c (cached_status): New static global.
1997 (win32_wait): Add declaration.
1998 (do_initial_child_stuff): Flush all initial pending debug events
1999 up to the initial breakpoint.
2000 (win32_wait): If CACHED_STATUS was set, return that instead
2001 of doing a real wait. Remove the code resuming the execution
2002 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2003 during the initial phase. Also remove the code changing
2004 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2005 TARGET_WAITKIND_STOPPED.
2006
e7f0d979
YQ
20072013-12-11 Yao Qi <yao@codesourcery.com>
2008
2009 * notif.c (handle_notif_ack): Return 0 if no notification
2010 matches.
2011
ebcf782c
DE
20122013-11-20 Doug Evans <dje@google.com>
2013
2014 * linux-low.c (linux_set_resume_request): Fix comment.
2015
20ad9378
DE
20162013-11-20 Doug Evans <dje@google.com>
2017
2018 * linux-low.c (resume_status_pending_p): Tweak comment.
2019
a196ebeb
WT
20202013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2021
2022 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2023 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2024 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2025 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2026 (srv_amd64_regobj): Add amd64-mpx.o.
2027 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2028 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2029 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2030 * i387-fp.c (num_pl_bnd_register) Added constant.
2031 (num_pl_bnd_cfg_registers) Added constant.
2032 (struct i387_xsave) Added reserved area and MPX fields.
2033 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2034 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2035 function.
2036 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2037 (init_registers_amd64_mpx_linux): Declare new function.
2038 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2039 (x86_64_regmap): Add MPX registers.
2040 (x86_linux_read_description): Add MPX case.
2041 (initialize_low_arch): Initialize MPX targets.
2042
0080a2f6
TT
20432013-11-18 Tom Tromey <tromey@redhat.com>
2044
2045 * configure: Rebuild.
2046 * configure.ac: Don't check for stdlib.h.
2047 * gdbreplay.c: Unconditionally include stdlib.h.
2048
2978b111
TT
20492013-11-18 Tom Tromey <tromey@redhat.com>
2050
2051 * config.in: Rebuild.
2052 * configure: Rebuild.
2053 * configure.ac: Don't use AC_HEADER_DIRENT.
2054
a3d08894
TT
20552013-11-18 Tom Tromey <tromey@redhat.com>
2056
2057 * server.h: Don't check HAVE_STRING_H.
2058 * gdbreplay.c: Don't check HAVE_STRING_H.
2059 * configure: Rebuild.
2060
0a5dd17d
TT
20612013-11-18 Tom Tromey <tromey@redhat.com>
2062
2063 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2064 LIBGNU.
2065
1bd2f0ba
TT
20662013-11-08 Tom Tromey <tromey@redhat.com>
2067
2068 * configure, config.in: Rebuild.
2069 * configure.ac: Remove unused configury.
2070
3266f10b
TT
20712013-11-08 Tom Tromey <tromey@redhat.com>
2072
2073 * acinclude.m4: Include common.m4, codeset.m4.
2074 * configure, config.in: Rebuild.
2075 * configure.ac: Use GDB_AC_COMMON.
2076
6682d959
AA
20772013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2078
2079 * linux-s390-low.c (HWCAP_S390_TE): New define.
2080 (s390_arch_setup): Consider the TE field in the HWCAP for
2081 determining 'have_regset_tdb'.
2082
fd0a4d76
SDJ
20832013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2084
2085 PR gdb/16014
2086 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2087 call to sizeof.
2088
1a3d890b
PA
20892013-10-02 Pedro Alves <palves@redhat.com>
2090
2091 * server.c (process_serial_event): Don't output "GDBserver
2092 exiting" if GDB is connected through stdio.
2093 * target.c (mywait): Likewise, be silent if GDB is connected
2094 through stdio.
2095
97ad4581
JB
20962013-10-01 Joel Brobecker <brobecker@adacore.com>
2097
2098 * lynx-low.c (lynx_add_threads_after_attach): New function.
2099 (lynx_attach): Remove call to add_thread. Add call to
2100 lynx_add_threads_after_attach instead.
2101
5b4e221c
MF
21022013-09-28 Mike Frysinger <vapier@gentoo.org>
2103
2104 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2105 * config.in, configure: Regenerated.
2106
ee47b2f8
YQ
21072013-09-18 Yao Qi <yao@codesourcery.com>
2108
2109 PR server/15959
2110 * server.c (start_inferior): Clear 'resume_info'.
2111
d6707650 21122013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2113
d6707650
JW
2114 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2115 for each register.
2116
9243dd0e 21172013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2118
9243dd0e
JW
2119 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2120 linux-tile-low.o to srv_tgtobj.
2121
c623a6ef
WN
21222013-09-16 Will Newton <will.newton@linaro.org>
2123
2124 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2125 out regs.
2126
fb71d39e
PA
21272013-09-06 Pedro Alves <palves@redhat.com>
2128
2129 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2130 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2131 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2132 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2133 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2134 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2135
8e7e9910
PA
21362013-09-06 Pedro Alves <palves@redhat.com>
2137
2138 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2139 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2140
7c3a12ca
PA
21412013-09-06 Pedro Alves <palves@redhat.com>
2142
2143 * linux-amd64-ipa.c: Include tracepoint.h.
2144 * linux-i386-ipa.c: Include tracepoint.h.
2145
8eb3d7b6
RW
21462013-09-06 Ricard Wanderlof <ricardw@axis.com>
2147
2148 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2149 (ps_get_thread_area): New function.
2150
eddddb9d
RW
21512013-09-06 Ricard Wanderlof <ricardw@axis.com>
2152
2153 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2154 (initialize_low_arch): Call init_registers_crisv32 rather than
2155 init_register_crisv32.
2156
533b0600
PA
21572013-09-05 Pedro Alves <palves@redhat.com>
2158
2159 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2160 to ...
2161 * hostio.h: ... this new file.
2162 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2163 win32-low.c: Include hostio.h.
2164
0ce3d3b5
PA
21652013-09-05 Pedro Alves <palves@redhat.com>
2166
2167 * server.h (gdb_client_data, handler_func, callback_handler_func)
2168 (delete_file_handler, add_file_handler, append_callback_event)
2169 (delete_callback_event, start_event_loop, initialize_event_loop):
2170 Move to event-loop.h and include it.
2171 * event-loop.h: New file.
2172
799cdc37
PA
21732013-09-05 Pedro Alves <palves@redhat.com>
2174
2175 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2176 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2177 (loaded_dll, unloaded_dll): Move to ...
2178 * dll.h: ... this new file.
2179 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2180
6a6bbd9d
PA
21812013-09-05 Pedro Alves <palves@redhat.com>
2182
2183 * server.h (current_process, get_thread_process, all_processes)
2184 (add_inferior_to_list, for_each_inferior, current_inferior)
2185 (remove_inferior, add_process, remove_process, find_process_pid)
2186 (have_started_inferiors_p, have_attached_inferiors_p)
2187 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2188 (clear_inferiors, find_inferior, find_inferior_id)
2189 (inferior_target_data, set_inferior_target_data)
2190 (inferior_regcache_data, set_inferior_regcache_data): Move to
2191 inferiors.h, and include it.
2192 * inferiors.h: New file.
2193
f699aaba
PA
21942013-09-05 Pedro Alves <palves@redhat.com>
2195
2196 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2197 Move ...
2198 * ax.h: ... here.
2199
c144c7a0
PA
22002013-09-05 Pedro Alves <palves@redhat.com>
2201
2202 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2203 tracepoint.h.
2204 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2205 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2206 (handle_tracepoint_general_set, handle_tracepoint_query)
2207 (tracepoint_finished_step, tracepoint_was_hit)
2208 (release_while_stepping_state_list, current_traceframe)
2209 (in_readonly_region, traceframe_read_mem)
2210 (fetch_traceframe_registers, traceframe_read_sdata)
2211 (traceframe_read_info, struct fast_tpoint_collect_status)
2212 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2213 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2214 (supply_fast_tracepoint_registers)
2215 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2216 (ipa_tdesc, claim_trampoline_space)
2217 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2218 (agent_mem_read, agent_get_trace_state_variable_value)
2219 (agent_set_trace_state_variable_value, agent_tsv_read)
2220 (agent_mem_read_string, get_raw_reg_func_addr)
2221 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2222 * tracepoint.h: ... this new file.
2223
ff42e6ab
PA
22242013-09-05 Pedro Alves <palves@redhat.com>
2225
2226 * server.h (perror_with_name, error, fatal, warning, paddress)
2227 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2228 include it.
2229 * utils.h: New file.
2230
541af0f4
PA
22312013-09-05 Pedro Alves <palves@redhat.com>
2232
2233 * server.h (remote_debug, noack_mode, transport_is_reliable)
2234 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2235 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2236 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2237 (write_enn, initialize_async_io, enable_async_io)
2238 (disable_async_io, check_remote_input_interrupt_request)
2239 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2240 (dead_thread_notify, prepare_resume_reply)
2241 (decode_address_to_semicolon, decode_address, decode_m_packet)
2242 (decode_M_packet, decode_X_packet, decode_xfer_write)
2243 (decode_search_memory_packet, unhexify, hexify)
2244 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2245 (look_up_one_symbol, relocate_instruction)
2246 (monitor_output): Move to remote-utils.h, and include it.
2247 * remote-utils.h: New file.
2248
eebdf26b
PA
22492013-09-05 Pedro Alves <palves@redhat.com>
2250
2251 * server.h (_): Delete.
2252
3aafd2ff
PA
22532013-09-02 Pedro Alves <palves@redhat.com>
2254
2255 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2256 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2257 allocated.
2258 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2259
cee83bcb
PM
22602013-09-02 Pierre Muller <muller@sourceware.org>
2261
2262 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2263 or WriteProcessMemory complete successfully and handle
2264 ERROR_PARTIAL_COPY error.
2265
9a13b2fa
PA
22662013-09-02 Pedro Alves <palves@redhat.com>
2267
2268 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2269 error instead of EIO.
2270
602e3198
JK
22712013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2272
2273 PR server/15604
2274 * linux-low.c: Include filestuff.h.
2275 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2276 * lynx-low.c: Include filestuff.h.
2277 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2278 * server.c: Include filestuff.h.
2279 (main): Call notice_open_fds.
2280 * spu-low.c: Include filestuff.h.
2281 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2282
96d7229d
LM
22832013-08-22 Luis Machado <lgustavo@codesourcery.com>
2284
2285 * Makefile.in: Explain why ../target and ../nat are not
2286 listed as include file search paths.
2287 (linux-waitpid.o): New object file rule.
2288 * configure.srv (srv_native_linux_obj): New variable.
2289 Replace all occurrences of linux native object files with
2290 $srv_native_linux_obj.
2291 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2292 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2293 (linux_enable_event_reporting): Remove declaration.
2294 (my_waitpid): Moved to common/linux-waitpid.c.
2295 (linux_wait_for_event): Pass ptid when calling
2296 linux_enable_event_reporting.
2297 (linux_supports_tracefork_flag): Remove.
2298 (linux_enable_event_reporting): Likewise.
2299 (linux_tracefork_grandchild): Remove.
2300 (STACK_SIZE): Moved to common/linux-ptrace.c.
2301 (linux_tracefork_child): Remove.
2302 (linux_test_for_tracefork): Remove.
2303 (linux_look_up_symbols): Call linux_supports_traceclone.
2304 (initialize_low): Remove call to linux_test_for_tracefork.
2305 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2306 common/linux-ptrace.h.
2307 (PTRACE_TYPE_ARG4): Likewise.
2308 Include linux-ptrace.h.
2309
32940073
PA
23102013-08-21 Pedro Alves <palves@redhat.com>
2311
2312 * config.in: Renegerate.
2313
33b60d58 23142013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2315
33b60d58
LM
2316 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2317 (SFILES): Remove $(srcdir)/common/target-common.c and
2318 add $(srcdir)/target/waitstatus.c.
2319 (OBS): Remove target-common.o and add waitstatus.o.
2320 (server_h): Remove $(srcdir)/../common/target-common.h and
2321 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2322 and $(srcdir)/../target/waitstatus.h.
2323 (target-common.o): Remove.
2324 (waitstatus.o): New target object file.
2325 * target.h: Do not include target-common.h and
2326 include target/resume.h, target/wait.h and
2327 target/waitstatus.h.
2328
b8e1b30e
LM
23292013-08-13 Luis Machado <lgustavo@codesourcery.com>
2330
2331 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2332 to PTRACE_TYPE_ARG3.
2333 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2334 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2335 PTRACE_TYPE_ARG4.
2336 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2337 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2338
7a60ad40
YQ
23392013-07-27 Jie Zhang <jie@codesourcery.com>
2340 Daniel Jacobowitz <dan@codesourcery.com>
2341 Yao Qi <yao@codesourcery.com>
2342
2343 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2344 (mips-linux-watch.o): New rule.
2345 (mips_linux_watch_h): New variable.
2346 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2347 srv_tgtobj.
2348 * linux-mips-low.c: Include mips-linux-watch.h.
2349 (struct arch_process_info, struct arch_lwp_info): New.
2350 (update_watch_registers_callback): New function.
2351 (mips_linux_new_process, mips_linux_new_thread) New functions.
2352 (mips_linux_prepare_to_resume, mips_insert_point): New
2353 functions.
2354 (mips_remove_point, mips_stopped_by_watchpoint): New
2355 functions.
2356 (rsp_bp_type_to_target_hw_bp_type): New function.
2357 (mips_stopped_data_address): New function.
2358 (the_low_target): Add watchpoint support functions.
2359
de6f69ad
YQ
23602013-07-27 Yao Qi <yao@codesourcery.com>
2361
2362 * i386-low.c: Include break-common.h.
2363 (enum target_hw_bp_type): Remove.
2364
3360c0bf
LM
23652013-07-24 Luis Machado <lgustavo@codesourcery.com>
2366
2367 * Makefile.in (SFILES): /common/target-common.c.
2368 (OBS): Add target-common.o.
2369 (server_h): Add $(srcdir)/../common/target-common.h.
2370 (target-common.o): New target.
2371 * server.c (queue_stop_reply_callback): Free
2372 status string after use.
2373 * target.c (target_waitstatus_to_string): Remove.
2374 * target.h: Include target-common.h.
2375 (resume_kind): Likewise.
2376 (target_waitkind): Likewise.
2377 (target_waitstatus): Likewise.
2378 (TARGET_WNOHANG): Likewise.
2379
bd885420
YQ
23802013-07-04 Yao Qi <yao@codesourcery.com>
2381
2382 * Makefile.in (host_alias): Use @host_noncanonical@.
2383 (target_alias): Use @target_noncanonical@.
2384 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2385 ACX_NONCANONICAL_HOST.
2386 * configure: Regenerated.
2387
2388 Revert:
2389 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2390
2391 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2392 * configure: Rebuild.
2393 * Makefile.in (version_host, version_target): Get from configure.
2394 (version.c): Use $(version_host) and $(version_target).
2395
17ef446e
PA
23962013-07-03 Pedro Alves <palves@redhat.com>
2397
2398 * Makefile.in (config.status): Depend on development.sh.
2399 * acinclude.m4: Include libmcheck.m4.
2400 * configure: Regenerate.
2401
7a9a7487
MG
24022013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2403
2404 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2405 attribute inside the parentheses.
2406 (winapi_DebugSetProcessKillOnExit): Ditto.
2407 (winapi_DebugBreakProcess): Ditto.
2408 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2409
49b64de6
MG
24102013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2411
2412 * notif.h (notif_event): Add a dummy member to avoid compiler
2413 errors.
2414
d5749ee7
PA
24152013-07-01 Pedro Alves <palves@redhat.com>
2416
2417 * hostio.c (HOSTIO_PATH_MAX): Define.
2418 (require_filename, handle_open, handle_unlink, handle_readlink):
2419 Use it.
2420
d8d2a3ee
PA
24212013-07-01 Pedro Alves <palves@redhat.com>
2422
2423 * server.h: Include "pathmax.h".
2424 * linux-low.c: Don't include sys/param.h.
2425 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2426 MAXPATHLEN.
2427 * win32-low.c: Don't include sys/param.h.
2428 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2429
bc7dea8d
PA
24302013-07-01 Pedro Alves <palves@redhat.com>
2431
2432 * event-loop.c: Don't check HAVE_UNISTD_H before including
2433 <unistd.h>.
2434 * gdbreplay.c: Likewise.
2435 * remote-utils.c: Likewise.
2436 * server.c: Likewise.
2437 * configure.ac: Don't check for unistd.h.
2438 * configure: Regenerate.
2439
d6c2da54
TT
24402013-06-28 Tom Tromey <tromey@redhat.com>
2441
2442 * Makefile.in (version.c): Use version.in, not
2443 common/version.in.
2444
257b6bec
MG
24452013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2446
2447 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2448 * configure: Rebuild.
2449 * Makefile.in (version_host, version_target): Get from configure.
2450 (version.c): Use $(version_host) and $(version_target).
2451
86ebe149
DK
24522013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2453
2454 Fix trace-status to output user name without trailing colon.
2455 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2456
f30aa5af
DK
24572013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2458
2459 Fix trace-status to output proper start-time and stop-time.
2460 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2461 output start time and stop time in hex as gdb expects.
2462
28a93511
YQ
24632013-06-26 Pedro Alves <pedro@codesourcery.com>
2464
2465 * tracepoint.c (build_traceframe_info_xml): Output trace state
2466 variables present in the trace buffer.
2467
01208463
TT
24682013-06-24 Tom Tromey <tromey@redhat.com>
2469
2470 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2471 create-version.sh.
2472 (version.o): Remove.
2473 * gdbreplay.c: Include version.h.
2474 (version, host_name): Don't declare.
2475 * server.h: Include version.h.
2476 (version, host_name): Don't declare.
2477
760256f9
PA
24782013-06-12 Pedro Alves <palves@redhat.com>
2479
2480 * linux-x86-low.c (linux_is_elf64): Delete global.
2481 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2482 with local linux_pid_exe_is_elf_64_file use.
2483
030031ee
PA
24842013-06-11 Pedro Alves <palves@redhat.com>
2485
2486 * linux-low.c (regset_disabled, disable_regset): New functions.
2487 (regsets_fetch_inferior_registers)
2488 (regsets_store_inferior_registers): Use them.
2489 (initialize_regsets_info); Don't allocate the disabled_regsets
2490 array here.
2491 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2492 comment.
2493
5da6eb0a
PA
24942013-06-11 Pedro Alves <palves@redhat.com>
2495
2496 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2497 xmalloc.
2498
7e5aaa09
PA
24992013-06-11 Pedro Alves <palves@redhat.com>
2500
2501 * linux-x86-low.c (initialize_low_arch): Call
2502 init_registers_x32_avx_linux.
2503
d878444c
JK
25042013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2505
2506 Fix compatibility with Android Bionic.
2507 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2508 it is not empty.
2509
3aee8918
PA
25102013-06-07 Pedro Alves <palves@redhat.com>
2511
5f2b57b5 2512 PR server/14823
3aee8918
PA
2513 * Makefile.in (OBS): Add tdesc.o.
2514 (IPA_OBJS): Add tdesc-ipa.o.
2515 (tdesc-ipa.o): New rule.
2516 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2517 interface.
2518 * linux-low.c (new_inferior): Delete.
2519 (disabled_regsets, num_regsets): Delete.
2520 (linux_add_process): Adjust to set the new per-process
2521 new_inferior flag.
2522 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2523 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2524 was a stop. When calling arch_setup, switch the current inferior
2525 to the thread that got an event.
2526 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2527 (regsets_fetch_inferior_registers)
2528 (regsets_store_inferior_registers): New regsets_info parameter.
2529 Adjust to use it.
2530 (linux_register_in_regsets): New regs_info parameter. Adjust to
2531 use it.
2532 (register_addr, fetch_register, store_register): New usrregs_info
2533 parameter. Adjust to use it.
2534 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2535 parameter regs_info. Adjust to use it.
2536 (linux_fetch_registers): Get the current inferior's regs_info, and
2537 adjust to use it.
2538 (linux_store_registers): Ditto.
2539 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2540 (initialize_low): Don't initialize the target_regsets here. Call
2541 initialize_low_arch.
2542 * linux-low.h (target_regsets): Delete declaration.
2543 (struct regsets_info): New.
2544 (struct usrregs_info): New.
2545 (struct regs_info): New.
2546 (struct process_info_private) <new_inferior>: New field.
2547 (struct linux_target_ops): Delete the num_regs, regmap, and
2548 regset_bitmap fields. New field regs_info.
2549 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2550 * i387-fp.c (num_xmm_registers): Delete.
2551 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2552 calls to new interface.
2553 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2554 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2555 Infer the number of xmm registers from the regcache's target
2556 description.
2557 * i387-fp.h (num_xmm_registers): Delete.
2558 * inferiors.c (add_thread): Don't install the thread's regcache
2559 here.
2560 * proc-service.c (gregset_info): Fetch the current inferior's
2561 regs_info. Adjust to use it.
2562 * regcache.c: Include tdesc.h.
2563 (register_bytes, reg_defs, num_registers)
2564 (gdbserver_expedite_regs): Delete.
2565 (get_thread_regcache): If the thread doesn't have a regcache yet,
2566 create one, instead of aborting gdbserver.
2567 (regcache_invalidate_one): Rename to ...
2568 (regcache_invalidate_thread): ... this.
2569 (regcache_invalidate_one): New.
2570 (regcache_invalidate): Only invalidate registers of the current
2571 process.
2572 (init_register_cache): Add target_desc parameter, and use it.
2573 (new_register_cache): Ditto. Assert the target description has a
2574 non zero registers_size.
2575 (regcache_cpy): Add assertions. Adjust.
2576 (realloc_register_cache, set_register_cache): Delete.
2577 (registers_to_string, registers_from_string): Adjust.
2578 (find_register_by_name, find_regno, find_register_by_number)
2579 (register_cache_size): Add target_desc parameter, and use it.
2580 (free_register_cache_thread, free_register_cache_thread_one)
2581 (regcache_release, register_cache_size): New.
2582 (register_size): Add target_desc parameter, and use it.
2583 (register_data, supply_register, supply_register_zeroed)
2584 (supply_regblock, supply_register_by_name, collect_register)
2585 (collect_register_as_string, collect_register_by_name): Adjust.
2586 * regcache.h (struct target_desc): Forward declare.
2587 (struct regcache) <tdesc>: New field.
2588 (init_register_cache, new_register_cache): Add target_desc
2589 parameter.
2590 (regcache_invalidate_thread): Declare.
2591 (regcache_invalidate_one): Delete declaration.
2592 (regcache_release): Declare.
2593 (find_register_by_number, register_cache_size, register_size)
2594 (find_regno): Add target_desc parameter.
2595 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2596 declarations.
2597 * remote-utils.c: Include tdesc.h.
2598 (outreg, prepare_resume_reply): Adjust.
2599 * server.c: Include tdesc.h.
2600 (gdbserver_xmltarget): Delete declaration.
2601 (get_features_xml, process_serial_event): Adjust.
2602 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2603 declare.
2604 (struct process_info) <tdesc>: New field.
2605 (ipa_tdesc): Declare.
2606 * tdesc.c: New file.
2607 * tdesc.h: New file.
2608 * tracepoint.c: Include tdesc.h.
2609 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2610 (get_context_regcache): Adjust to pass ipa_tdesc down.
2611 (do_action_at_tracepoint): Adjust to get the register cache size
2612 from the context regcache's description.
2613 (traceframe_walk_blocks): Adjust to get the register cache size
2614 from the current trace frame's description.
2615 (traceframe_get_pc): Adjust to get current trace frame's
2616 description and pass it down.
2617 (gdb_collect): Adjust to get the register cache size from the
2618 IPA's description.
2619 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2620 (gdbserver_xmltarget): Delete.
2621 (initialize_low_tracepoint): Set the ipa's target description.
2622 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2623 (initialize_low_tracepoint): Set the ipa's target description.
2624 * linux-x86-low.c: Include tdesc.h.
2625 [__x86_64__] (is_64bit_tdesc): New.
2626 (ps_get_thread_area, x86_get_thread_area): Use it.
2627 (i386_cannot_store_register): Rename to ...
2628 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2629 (i386_cannot_fetch_register): Rename to ...
2630 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2631 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2632 to new interface.
2633 (target_regsets): Rename to ...
2634 (x86_regsets): ... this.
2635 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2636 interface.
2637 (x86_siginfo_fixup): Use is_64bit_tdesc.
2638 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2639 (tdesc_x32_avx_linux, tdesc_x32_linux)
2640 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2641 Declare.
2642 (x86_linux_update_xmltarget): Delete.
2643 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2644 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2645 (AMD64_LINUX_USER64_CS): New.
2646 (x86_linux_read_description): New, based on
2647 x86_linux_update_xmltarget.
2648 (same_process_callback): New.
2649 (x86_arch_setup_process_callback): New.
2650 (x86_linux_update_xmltarget): New.
2651 (x86_regsets_info): New.
2652 (amd64_linux_regs_info): New.
2653 (i386_linux_usrregs_info): New.
2654 (i386_linux_regs_info): New.
2655 (x86_linux_regs_info): New.
2656 (x86_arch_setup): Reimplement.
2657 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2658 (x86_emit_ops): Ditto.
2659 (the_low_target): Adjust. Install x86_linux_regs_info,
2660 x86_cannot_fetch_register, and x86_cannot_store_register.
2661 (initialize_low_arch): New.
2662 * linux-ia64-low.c (tdesc_ia64): Declare.
2663 (ia64_fetch_register): Adjust.
2664 (ia64_usrregs_info, regs_info): New globals.
2665 (ia64_regs_info): New function.
2666 (the_low_target): Adjust.
2667 (initialize_low_arch): New function.
2668 * linux-sparc-low.c (tdesc_sparc64): Declare.
2669 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2670 Adjust.
2671 (sparc_arch_setup): New function.
2672 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2673 (the_low_target): Adjust.
2674 (initialize_low_arch): New function.
2675 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2676 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2677 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2678 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2679 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2680 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2681 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2682 (tdesc_powerpc_isa205_vsx64l): Declare.
2683 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2684 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2685 (ppc_set_pc, ppc_get_hwcap): Adjust.
2686 (ppc_usrregs_info): Forward declare.
2687 (!__powerpc64__) ppc_regmap_adjusted: New global.
2688 (ppc_arch_setup): Adjust to the current process'es target
2689 description.
2690 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2691 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2692 (ppc_store_evrregset): Adjust.
2693 (target_regsets): Rename to ...
2694 (ppc_regsets): ... this, and make static.
2695 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2696 (ppc_regs_info): New function.
2697 (the_low_target): Adjust.
2698 (initialize_low_arch): New function.
2699 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2700 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2701 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2702 (tdesc_s390x_linux64v2): Declare.
2703 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2704 (s390_fill_gregset, s390_store_last_break): Adjust.
2705 (target_regsets): Rename to ...
2706 (s390_regsets): ... this, and make static.
2707 (s390_get_pc, s390_set_pc): Adjust.
2708 (s390_get_hwcap): New target_desc parameter, and use it.
2709 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2710 (s390_arch_setup): Adjust to set the current process'es target
2711 description. Don't adjust the regmap.
2712 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2713 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2714 (regs_info_3264): New globals.
2715 (s390_regs_info): New function.
2716 (the_low_target): Adjust.
2717 (initialize_low_arch): New function.
2718 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2719 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2720 [__mips64] (init_registers_mips_linux)
2721 (init_registers_mips_dsp_linux): Delete defines.
2722 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2723 (have_dsp): New global.
2724 (mips_read_description): New, based on mips_arch_setup.
2725 (mips_arch_setup): Reimplement.
2726 (get_usrregs_info): New function.
2727 (mips_cannot_fetch_register, mips_cannot_store_register)
2728 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2729 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2730 (target_regsets): Rename to ...
2731 (mips_regsets): ... this, and make static.
2732 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2733 (dsp_regs_info, regs_info): New globals.
2734 (mips_regs_info): New function.
2735 (the_low_target): Adjust.
2736 (initialize_low_arch): New function.
2737 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2738 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2739 Declare.
2740 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2741 (arm_read_description): New, with bits factored from
2742 arm_arch_setup.
2743 (arm_arch_setup): Reimplement.
2744 (target_regsets): Rename to ...
2745 (arm_regsets): ... this, and make static.
2746 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2747 (arm_regs_info): New function.
2748 (the_low_target): Adjust.
2749 (initialize_low_arch): New function.
2750 * linux-m68k-low.c (tdesc_m68k): Declare.
2751 (target_regsets): Rename to ...
2752 (m68k_regsets): ... this, and make static.
2753 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2754 (m68k_regs_info): New function.
2755 (m68k_arch_setup): New function.
2756 (the_low_target): Adjust.
2757 (initialize_low_arch): New function.
2758 * linux-sh-low.c (tdesc_sharch): Declare.
2759 (target_regsets): Rename to ...
2760 (sh_regsets): ... this, and make static.
2761 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2762 (sh_regs_info, sh_arch_setup): New functions.
2763 (the_low_target): Adjust.
2764 (initialize_low_arch): New function.
2765 * linux-bfin-low.c (tdesc_bfin): Declare.
2766 (bfin_arch_setup): New function.
2767 (bfin_usrregs_info, regs_info): New globals.
2768 (bfin_regs_info): New function.
2769 (the_low_target): Adjust.
2770 (initialize_low_arch): New function.
2771 * linux-cris-low.c (tdesc_cris): Declare.
2772 (cris_arch_setup): New function.
2773 (cris_usrregs_info, regs_info): New globals.
2774 (cris_regs_info): New function.
2775 (the_low_target): Adjust.
2776 (initialize_low_arch): New function.
2777 * linux-cris-low.c (tdesc_crisv32): Declare.
2778 (cris_arch_setup): New function.
2779 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2780 (cris_regs_info): New function.
2781 (the_low_target): Adjust.
2782 (initialize_low_arch): New function.
2783 * linux-m32r-low.c (tdesc_m32r): Declare.
2784 (m32r_arch_setup): New function.
2785 (m32r_usrregs_info, regs_info): New globals.
2786 (m32r_regs_info): Adjust.
2787 (initialize_low_arch): New function.
2788 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2789 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2790 (tic6x_usrregs_info): Forward declare.
2791 (tic6x_read_description): New function, based on ...
2792 (tic6x_arch_setup): ... this. Reimplement.
2793 (target_regsets): Rename to ...
2794 (tic6x_regsets): ... this, and make static.
2795 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2796 (tic6x_regs_info): New function.
2797 (the_low_target): Adjust.
2798 (initialize_low_arch): New function.
2799 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2800 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2801 (target_regsets): Rename to ...
2802 (xtensa_regsets): ... this, and make static.
2803 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2804 globals.
2805 (xtensa_arch_setup, xtensa_regs_info): New functions.
2806 (the_low_target): Adjust.
2807 (initialize_low_arch): New function.
2808 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2809 (nios2_arch_setup): Set the current process'es tdesc.
2810 (target_regsets): Rename to ...
2811 (nios2_regsets): ... this.
2812 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2813 (nios2_regs_info): New function.
2814 (the_low_target): Adjust.
2815 (initialize_low_arch): New function.
a261b8f5
PA
2816 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2817 (aarch64_arch_setup): Set the current process'es tdesc.
2818 (target_regsets): Rename to ...
2819 (aarch64_regsets): ... this.
2820 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2821 (aarch64_regs_info): New function.
2822 (the_low_target): Adjust.
2823 (initialize_low_arch): New function.
3aee8918
PA
2824 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2825 globals.
2826 (target_regsets): Rename to ...
2827 (tile_regsets): ... this.
2828 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2829 (tile_regs_info): New function.
2830 (tile_arch_setup): Set the current process'es tdesc.
2831 (the_low_target): Adjust.
2832 (initialize_low_arch): New function.
2833 * spu-low.c (tdesc_spu): Declare.
2834 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2835 * win32-arm-low.c (tdesc_arm): Declare.
2836 (arm_arch_setup): New function.
2837 (the_low_target): Install arm_arch_setup instead of
2838 init_registers_arm.
2839 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2840 (init_windows_x86): Rename to ...
2841 (i386_arch_setup): ... this. Set `win32_tdesc'.
2842 (the_low_target): Adjust.
2843 * win32-low.c (win32_tdesc): New global.
2844 (child_add_thread): Don't create the thread cache here.
2845 (do_initial_child_stuff): Set the new process'es tdesc.
2846 * win32-low.h (struct target_desc): Forward declare.
2847 (win32_tdesc): Declare.
2848 * lynx-i386-low.c (tdesc_i386): Declare global.
2849 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2850 * lynx-low.c (lynx_tdesc): New global.
2851 (lynx_add_process): Set the new process'es tdesc.
2852 * lynx-low.h (struct target_desc): Forward declare.
2853 (lynx_tdesc): Declare global.
2854 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2855 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2856 * nto-low.c (nto_tdesc): New global.
2857 (do_attach): Set the new process'es tdesc.
2858 * nto-low.h (struct target_desc): Forward declare.
2859 (nto_tdesc): Declare.
2860 * nto-x86-low.c (tdesc_i386): Declare.
2861 (nto_x86_arch_setup): Set `nto_tdesc'.
2862
b1fbec62
GB
28632013-06-04 Gary Benson <gbenson@redhat.com>
2864
2865 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2866 to qSupported response when appropriate.
2867 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2868 with nonzero-length annex.
2869 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2870 arguments supplied in annex.
2871
d1ec4ce7
DE
28722013-05-31 Doug Evans <dje@google.com>
2873
ac44adcb 2874 PR server/15594
d1ec4ce7
DE
2875 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2876 64 bits in 64-cross-32 environment.
2877
9b25f2d3
PA
28782013-05-28 Pedro Alves <palves@redhat.com>
2879
2880 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2881 (aarch64-without-fpu.c): Delete rule.
2882 * configure.srv (aarch64*-*-linux*): Remove references to
2883 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2884 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2885 declaration.
2886
6740dc9c
PA
28872013-05-24 Pedro Alves <palves@redhat.com>
2888
2889 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2890 instead of strchr/decode_address. Error if the range isn't split
2891 with a ','. Don't assume there's be a ':' in the action.
2892
c2d6af84
PA
28932013-05-23 Yao Qi <yao@codesourcery.com>
2894 Pedro Alves <palves@redhat.com>
2895
2896 * linux-low.c (lwp_in_step_range): New function.
2897 (linux_wait_1): If the thread was range stepping and stopped
2898 outside the stepping range, report the stop to GDB. Otherwise,
2899 continue stepping. Add range stepping debug output.
2900 (linux_set_resume_request): Copy the step range from the resume
2901 request to the lwp.
2902 (linux_supports_range_stepping): New.
2903 (linux_target_ops) <supports_range_stepping>: Set to
2904 linux_supports_range_stepping.
2905 * linux-low.h (struct linux_target_ops)
2906 <supports_range_stepping>: New field.
2907 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2908 * linux-x86-low.c (x86_supports_range_stepping): New.
2909 (the_low_target) <supports_range_stepping>: Set to
2910 x86_supports_range_stepping.
2911 * server.c (handle_v_cont): Handle 'r' action.
2912 (handle_v_requests): Append ";r" if the target supports range
2913 stepping.
2914 * target.h (struct thread_resume) <step_range_start,
2915 step_range_end>: New fields.
2916 (struct target_ops) <supports_range_stepping>:
2917 New field.
2918 (target_supports_range_stepping): New macro.
2919
58794e1a
JB
29202013-05-17 Joel Brobecker <brobecker@adacore.com>
2921
2922 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2923 confusion in comment.
2924
d631c5a7
JB
29252013-05-17 Joel Brobecker <brobecker@adacore.com>
2926
2927 * lynx-low.c (struct process_info_private): New type.
2928 (lynx_add_process): New function.
2929 (lynx_create_inferior, lynx_attach): Replace calls to
2930 add_process by calls to lynx_add_process.
2931 (lynx_resume): If PTID is null, then try using
2932 current_process()->private->last_wait_event_ptid.
2933 Add comments.
2934 (lynx_clear_inferiors): Delete. The contents of that function
2935 has been inlined in lynx_mourn;
2936 (lynx_wait_1): Save the ptid in the process's private data.
2937 (lynx_mourn): Free the process' private data. Replace call
2938 to lynx_clear_inferiors by call to clear_inferiors.
2939
96f7a20f
YQ
29402013-05-17 Yao Qi <yao@codesourcery.com>
2941
2942 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2943 the right place.
2944
db0dfaa0
LM
29452013-05-16 Luis Machado <lgustavo@codesourcery.com>
2946
2947 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2948 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2949 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2950 PT_TEXT_END_ADDR guards. Update comments.
2951 (linux_target_op) <read_offsets>: Conditionally define to
2952 linux_read_offsets if the target is UCLIBC and if it defines
2953 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2954
68f5f838
SL
29552013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2956 Andrew Jenner <andrew@codesourcery.com>
2957
2958 * Makefile.in (SFILES): Add linux-nios2-low.c.
2959 (clean): Add action to delete nios2-linux.c.
2960 (nios2-linux.c): New rule.
2961 * configure.srv: Add nios2*-*-linux*.
2962 * linux-nios2-low.c: New.
2963
1ebff1fd
HAQ
29642013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2965
2966 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2967
f6150862
HZ
29682013-04-25 Hui Zhu <hui@codesourcery.com>
2969
2970 PR gdb/15186
f6150862
HZ
2971 * ax.c (ax_printf): Add fflush.
2972
614c279d
TT
29732013-04-22 Tom Tromey <tromey@redhat.com>
2974
2975 * Makefile.in (SFILES): Add filestuff.c.
2976 (OBS): Add filestuff.o.
2977 (filestuff.o): New target.
2978 * config.in, configure: Rebuild.
2979 * configure.ac: Check for fdwalk, pipe2.
2980
7d4e5717
PA
29812013-04-17 Pedro Alves <palves@redhat.com>
2982
2983 * configure.ac (USE_THREAD_DB): Delete variable.
2984 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2985 Don't AC_SUBST USE_THREAD_DB.
2986 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2987 * config.in, configure: Regenerate.
2988
d5c93e41
PA
29892013-04-16 Pedro Alves <palves@redhat.com>
2990
2991 * linux-low.h (struct lwp_info) <thread_known>: Move under
2992 the USE_THREAD_DB #ifdef.
2993
04f5fe89
PA
29942013-04-16 Pedro Alves <palves@redhat.com>
2995
2996 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2997 (linux-low.o): Delete rule.
2998 * linux-low.h: Always include "gdb_thread_db.h" instead of
2999 conditionally including thread_db.h.
3000 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3001 HAVE_THREAD_DB_H.
3002
480b27bf
JK
30032013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3004
3005 * Makefile.in (install-only): Fix make install regression.
3006
43662968
JK
30072013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3008
3009 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3010 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3011 installation.
3012 * gdbserver.1: Remove.
3013
3e74e146
PA
30142013-03-22 Pedro Alves <palves@redhat.com>
3015
3016 * linux-low.c (handle_extended_wait): Don't call
3017 linux_enable_event_reporting.
3018
a8347a2a
TT
30192013-03-15 Tony Theodore <tonyt@logyst.com>
3020
3021 PR build/9098:
3022 * Makefile.in (SHELL): Use @SHELL@.
3023
eeb56fa7
SDJ
30242013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3025
3026 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3027 compiler warning.
3028
4fa7e2ff
JB
30292013-03-13 Joel Brobecker <brobecker@adacore.com>
3030
3031 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3032 Remove extraneous NULL element.
3033
8ddb1965
YQ
30342013-03-13 Yao Qi <yao@codesourcery.com>
3035
3036 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3037 'V' block in trace frame.
3038
9accd112
MM
30392013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3040
3041 * target.h (struct target_ops): Add btrace ops.
3042 (target_supports_btrace): New macro.
3043 (target_enable_btrace): New macro.
3044 (target_disable_btrace): New macro.
3045 (target_read_btrace): New macro.
3046 * gdbthread.h (struct thread_info): Add btrace field.
3047 * server.c: Include btrace-common.h.
3048 (handle_btrace_general_set): New function.
3049 (handle_btrace_enable): New function.
3050 (handle_btrace_disable): New function.
3051 (handle_general_set): Call handle_btrace_general_set.
3052 (handle_qxfer_btrace): New function.
3053 (struct qxfer qxfer_packets[]): Add btrace entry.
3054 * inferiors.c (remove_thread): Disable btrace.
3055 * linux-low: Include linux-btrace.h.
3056 (linux_low_enable_btrace): New function.
3057 (linux_low_read_btrace): New function.
3058 (linux_target_ops): Add btrace ops.
3059 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3060 Add srv_linux_btrace=yes.
3061 (x86_64-*-linux*): Add linux-btrace.o.
3062 Add srv_linux_btrace=yes.
3063 * configure.ac: Define HAVE_LINUX_BTRACE.
3064 * config.in: Regenerated.
3065 * configure: Regenerated.
3066
5cc22e4c
MM
30672013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3068
3069 * server.c (handle_qxfer): Preserve error message if -3 is
3070 returned.
3071 (qxfer): Document the -3 return value.
3072
7c97f91e
MM
30732013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3074
3075 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3076 (linux_btrace_h): New variable.
3077 (linux-btrace.o): New rule.
3078
be9a119c 30792013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3080 Hafiz Abid Qadeer <abidh@codesourcery.com>
3081
3082 * tracepoint.c (trace_buffer_size): New global.
3083 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3084 (init_trace_buffer): Change to one-argument function. Allocate
3085 trace buffer memory.
3086 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3087 handle QTBuffer:size packet.
3088 (cmd_bigqtbuffer_size): New function.
3089 (initialize_tracepoint): Call init_trace_buffer with
3090 DEFAULT_TRACE_BUFFER_SIZE.
3091 * server.c (handle_query): Add QTBuffer:size in the
3092 supported packets.
3093
e64f7499
YQ
30942013-03-07 Yao Qi <yao@codesourcery.com>
3095
3096 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3097 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3098 of -1.
3099 (cmd_qtsp): Adjust condition. Do post increment.
3100 Set cur_action and cur_step_action back to 0.
3101
f0ae6fc3
PA
31022013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3103
3104 PR server/15236
3105 * linux-low.c (linux_write_memory): Return early success if LEN is
3106 zero.
3107
b5b0b0af
CV
31082013-03-05 Corinna Vinschen <vinschen@redhat.de>
3109
334ad4a8 3110 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3111
589bc927
TT
31122013-02-28 Tom Tromey <tromey@redhat.com>
3113
3114 * configure.ac: Invoke AC_SYS_LARGEFILE.
3115 * configure, config.in: Rebuild.
3116
dfe07582
CV
31172013-02-28 Corinna Vinschen <vinschen@redhat.com>
3118
3119 * win32-low.c: Throughout, fix format strings and casts of
3120 printf-like functions to avoid type related warnings on all
3121 platforms.
3122 (get_child_debug_event): Print dwDebugEventCode as hex since
3123 that's how it's usually documented.
3124
736cd585
YQ
31252013-02-28 Yao Qi <yao@codesourcery.com>
3126
3127 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3128 pulongest.
3129
e1f58301
JW
31302013-02-27 Jiong Wang <jiwang@tilera.com>
3131
3132 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3133 (reg-tilegx32.c): New rule.
3134 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3135 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3136 different register info initializer according to elf class.
3137 (init_registers_tilgx32): New function. The tilegx32 register info
3138 initializer.
3139 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3140 (tile_store_gregset): Likewise.
3141
d171ca78
YQ
31422013-02-27 Yao Qi <yao@codesourcery.com>
3143
3144 * server.c (process_point_options): Print debug message when
3145 debug_threads is true.
3146
282bbdf3
YQ
31472013-02-26 Yao Qi <yao@codesourcery.com>
3148
3149 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3150
aca22551
PA
31512013-02-19 Pedro Alves <palves@redhat.com>
3152 Kai Tietz <ktietz@redhat.com>
3153
3154 PR gdb/15161
3155
3156 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3157 instead of strtoul to extract address from packet.
3158 (process_serial_event) <'z'>: Likewise.
3159
4f3cee1c
YQ
31602013-02-18 Yao Qi <yao@codesourcery.com>
3161
3162 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3163
8e1d55a3
PA
31642013-02-14 Pedro Alves <palves@redhat.com>
3165
3166 Plug memory leak.
3167
3168 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3169 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3170
458820da
PA
31712013-02-14 Pedro Alves <palves@redhat.com>
3172
3173 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3174
baea0dae
PA
31752013-02-14 Pedro Alves <palves@redhat.com>
3176
3177 * tracepoint.c (save_string): Delete.
3178 (add_tracepoint_action): Use savestring instead of save_string.
3179
0b1afbb3
PA
31802013-02-12 Pedro Alves <palves@redhat.com>
3181
3182 * linux-xtensa-low.c: Ditto.
3183 * xtensa-xtregs.c: Ditto.
3184
8a4ac37e
PA
31852013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3186
3187 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3188 thread_db.
3189
148de6bb
MS
31902013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3191
3192 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3193 aarch64_num_wp_regs and aarch64_num_bp_regs to
3194 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3195
55fac6e0
MS
31962013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3197
3198 * linux-aarch64-low.c (ps_get_thread_area): Replace
3199 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3200
176eb98c
MS
32012013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3202 Marcus Shawcroft <marcus.shawcroft@arm.com>
3203 Nigel Stephens <nigel.stephens@arm.com>
3204 Yufeng Zhang <yufeng.zhang@arm.com>
3205
3206 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3207 (aarch64.c, aarch64-without-fpu.c): New targets.
3208 * configure.srv (aarch64*-*-linux*): New.
3209 * linux-aarch64-low.c: New file.
3210
56f7af9c
MS
32112013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3212
43aaf8b6 3213 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3214 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3215 (dequeue_one_deferred_signal, linux_resume_one_thread)
3216 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3217 (linux_tracefork_grandchild, linux_test_for_tracefork)
3218 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3219 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3220 where the argument is 0.
3221
60f662b0
YQ
32222013-01-25 Yao Qi <yao@codesourcery.com>
3223
3224 * event-loop.c: Include "queue.h".
3225 (gdb_event_p): New typedef.
3226 (struct gdb_event) <next_event>: Remove.
3227 (event_queue): Change to QUEUE(gdb_event_p).
3228 (async_queue_event): Remove.
3229 (gdb_event_xfree): New.
3230 (initialize_event_loop): New.
3231 (process_event): Use API from QUEUE.
3232 (wait_for_event): Likewise.
3233 * server.c (main): Call initialize_event_loop.
3234 * server.h (initialize_event_loop): Declare.
3235
5ae4861a
YQ
32362013-01-18 Yao Qi <yao@codesourcery.com>
3237
3238 * ax.h (struct eval_agent_expr_context): New.
3239 (gdb_eval_agent_expr): Update declaration.
3240 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3241 TFRAME. Add new argument CTX.
3242 * server.h (struct eval_agent_expr_context): Declare.
3243 (agent_mem_read, agent_tsv_read): Update declaration.
3244 (agent_mem_read_string): Likewise.
3245 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3246 (add_traceframe_block): Add new argument TPOINT.
3247 Increase TPOINT->traceframe_usage.
3248 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3249 eval_tracepoint_agent_expr.
3250 (condition_true_at_tracepoint): Likewise.
3251 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3252 (agent_mem_read_string, agent_tsv_read): Likewise.
3253
85e00e85
YQ
32542013-01-16 Yao Qi <yao@codesourcery.com>
3255
3256 * linux-low.c (linux_resume_one_lwp): Don't check
3257 'lwp->bp_reinsert != 0'.
3258
4039cf45
JB
32592013-01-07 Joel Brobecker <brobecker@adacore.com>
3260 Pedro Alves <palves@redhat.com>
3261
3262 * lynx-low.c (ptrace_request_to_str): Define a temporary
3263 macro and use it to simplify this function's implementation.
3264
9044dee2
JB
32652013-01-07 Joel Brobecker <brobecker@adacore.com>
3266
3267 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3268 sets errno.
3269
e6352c8f
JB
32702013-01-07 Joel Brobecker <brobecker@adacore.com>
3271
3272 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3273
50681a27
JB
32742013-01-07 Joel Brobecker <brobecker@adacore.com>
3275
3276 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3277
3f6e77ef
JB
32782013-01-07 Joel Brobecker <brobecker@adacore.com>
3279
3280 * lynx-low.c (lynx_resume): Use the resume_info parameter
3281 to determine the ptid for the lynx_ptrace call, unless
3282 it is equal to minus_one_ptid, in which case we use the
3283 ptid of the current_inferior.
3284 (lynx_wait_1): After having received a thread create/exit
3285 event, resume the inferior's execution using the signaling
3286 thread's ptid, rather than the old ptid.
3287
7fda33ae
JB
32882013-01-07 Joel Brobecker <brobecker@adacore.com>
3289
3290 * lynx-low.c (lynx_resume): Delete variable ret.
3291
b9786c74
JB
32922013-01-01 Joel Brobecker <brobecker@adacore.com>
3293
3294 * gdbreplay.c (gdbreplay_version): Update copyright year.
3295 * server.c (gdbserver_version): Likewise.
3296
8b93d60f
JB
32972012-12-17 Joel Brobecker <brobecker@adacore.com>
3298
3299 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3300 new thread.
3301
037335a7
JB
33022012-12-17 Joel Brobecker <brobecker@adacore.com>
3303
3304 * lynx-low.c (ptrace_request_to_str): Add handling for
3305 PTRACE_GETTRACESIG.
3306
52d4cbd8
JB
33072012-12-17 Joel Brobecker <brobecker@adacore.com>
3308
3309 * lynx-low.c (lynx_attach): Delete variable new_process.
3310
ab8f6ca9
JB
33112012-12-17 Joel Brobecker <brobecker@adacore.com>
3312
3313 * lynx-low.c (lynx_create_inferior): Delete variable
3314 new_process.
3315
78cbc024
JB
33162012-12-17 Joel Brobecker <brobecker@adacore.com>
3317
3318 * lynx-low.c (ptrace_request_to_str): Do not handle
3319 PTRACE_GETTHREADLIST if this macro does not exist.
3320
14a00470
YQ
33212012-12-15 Yao Qi <yao@codesourcery.com>
3322
3323 * Makefile.in (OBS): Add notif.o.
3324 * notif.c, notif.h: New.
3325 * server.c: Include "notif.h".
3326 (struct vstop_notif) <next>: Remove.
3327 <base>: New field.
3328 (queue_stop_reply): Update.
3329 (push_event, send_next_stop_reply): Remove.
3330 (discard_queued_stop_replies): Update.
3331 (notif_stop): New variable.
3332 (handle_v_stopped): Remove.
3333 (handle_v_requests): Don't call handle_v_stopped. Call
3334 handle_ack_notif instead.
3335 (queue_stop_reply_callback): Call notif_event_enque instead
3336 of queue_stop_reply.
3337 (handle_status): Don't call send_next_stop_reply, call
3338 notif_write_event instead.
3339 (kill_inferior_callback): Likewise.
3340 (detach_or_kill_inferior_callback): Likewise.
3341 (main): Call initialize_notif.
3342 (process_serial_event): Call QUEUE_is_empty.
3343 (handle_target_event): Call notif_push instead of push event.
3344 * server.h (push_event): Remove declaration.
3345
61c125b9
TT
33462012-12-10 Tom Tromey <tromey@redhat.com>
3347
3348 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3349 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3350 macros.
3351 (.c.o): Rewrite.
3352 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3353 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3354 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3355 (amd64-linux-ipa.o, ax.o): Rewrite.
3356 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3357 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3358 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3359 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3360 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3361 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3362 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3363 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3364 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3365 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3366 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3367 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3368 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3369 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3370 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3371 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3372 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3373 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3374 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3375 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3376 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3377 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3378 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3379 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3380 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3381 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3382 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3383 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3384 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3385 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3386 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3387 (reg-tilegx.o): Remove.
3388 (all_object_files): New macro.
3389 Include .deps files.
3390 * aclocal.m4, configure: Rebuild.
3391 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3392 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3393 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3394
e90e9ad9
TT
33952012-12-05 Tom Tromey <tromey@redhat.com>
3396
3397 PR gdb/14917:
3398 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3399
02d403bf 34002012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3401
3402 * configure.ac: Check for linux/perf_event.h.
3403 * config.in: Regenerated.
3404 * configure: Regenerated.
3405
0270a750
PA
34062012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3407
3408 * hostio.c (handle_readlink): Decrease buffer size
3409 parameter passed to readlink by one byte.
3410
8c29b58e
YQ
34112012-11-26 Yao Qi <yao@codesourcery.com>
3412
3413 * configure.ac (build_warnings): Append '-Wempty-body'.
3414 * configure: Regenerated.
3415 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3416 body.
3417
8bdce1ff
PM
34182012-11-15 Pierre Muller <muller@sourceware.org>
3419
3420 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3421 * config.in: Regenerate.
3422 * configure: Regenerate.
3423 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3424 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3425 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3426 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3427 header.
3428 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3429 instead of <sys/wait.h> header.
3430 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3431
02d403bf 34322012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3433
3434 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3435 (various make rules): Remove -DGDBSERVER
3436
fbd5db48
YQ
34372012-11-09 Yao Qi <yao@codesourcery.com>
3438
3439 * spu-low.c (current_ptid): Move it to ..
3440 * gdbthread.h: ... here. New.
3441 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3442 * server.c (myresume, process_serial_event): Likewise.
3443 * thread-db.c (thread_db_find_new_threads): Likewise.
3444 * tracepoint.c (run_inferior_command): Likewise.
3445
b3dc46ff
AB
34462012-10-01 Andrew Burgess <aburgess@broadcom.com>
3447
3448 * server.c (handle_search_memory_1): Include access length in
3449 warning message.
3450
07c04788
HPN
34512012-09-05 Michael Brandt <michael.brandt@axis.com>
3452
3453 * linux-crisv32-low.c: Fix compile errors.
3454
918d227b
YQ
34552012-09-04 Yao Qi <yao@codesourcery.com>
3456
3457 * tracepoint.c (cmd_qtsv): Adjust debug message.
3458 Don't check CUR_TPOINT.
3459
18c1b81a
YQ
34602012-08-28 Yao Qi <yao@codesourcery.com>
3461
3462 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3463 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3464 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3465 Remove declarations of xmalloc, xreallloc, xstrdup and
3466 freeargv.
3467 * Makefile.in (libiberty_h): New.
3468 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3469 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3470
dc82f37b
YQ
34712012-08-23 Yao Qi <yao@codesourcery.com>
3472
3473 * server.h: Remove declaration of 'xsnprintf'.
3474
406b1477
KS
34752012-08-22 Keith Seitz <keiths@redhat.com>
3476
3477 * server.h: Include build-gnulib-gbserver/config.h.
3478 * gdbreplay.c: Likewise.
3479
e6712ff1
DE
34802012-08-08 Doug Evans <dje@google.com>
3481
3482 * Makefile.in (SFILES): Add gdb_vecs.c.
3483 (OBS): Add gdb_vecs.o.
3484 (gdb_vecs_h, host_defs_h): New variables.
3485 (thread-db.o): Add $(gdb_vecs_h) dependency.
3486 (gdb_vecs.o): New rule.
3487 * thread-db.c: #include "gdb_vecs.h".
3488 (thread_db_load_search): Use a vector to iterate over path elements.
3489 Handle text appearing after "$pdir".
3490
3491 * configure.ac: Add check for strstr.
3492 * config.in: Regenerate.
3493 * configure: Regenerate.
3494
7c3270ae
UW
34952012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3496
3497 * hostio.c (handle_pread): If pread fails, fall back to attempting
3498 lseek/read.
3499 (handle_pwrite): Likewise for pwrite.
3500
b62e2b27
UW
35012012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3502
3503 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3504 between unsupported TYPE and unimplementable ADDR/LEN combination.
3505 (arm_insert_point): Act on new return value.
3506
78a99e91
PA
35072012-07-31 Pedro Alves <palves@redhat.com>
3508
3509 * server.c (process_point_options): Only skip tokens if we find
3510 one that is unrecognized. Don't treat 'X' specially while
3511 skipping unrecognized tokens.
3512
fcf303ab
UW
35132012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3514
3515 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3516 to 4-byte-align HW breakpoint addresses for Thumb.
3517
7255706c
YQ
35182012-07-27 Yao Qi <yao@codesourcery.com>
3519
3520 PR remote/14161.
3521
3522 * server.h: Declare gdb_agent_about_to_close.
3523 * target.c (kill_inferior): Include "agent.h".
3524 New. Send command 'kill'.
3525 * target.h (kill_inferior): Removed macro.
3526 * tracepoint.c (gdb_agent_about_to_close): New.
3527 (gdb_agent_helper_thread): Handle command 'close'.
3528 Wait endlessly until the inferior stops.
3529 Install gdb_agent_remove_socket to atexit hook.
3530 (agent_socket_name): New static variable.
3531 (gdb_agent_socket_init): Replace local variable 'name' with
3532 'agent_socket_name'.
3533 (gdb_agent_remove_socket): New.
3534
5a3f286f
YQ
35352012-07-27 Yao Qi <yao@codesourcery.com>
3536
3537 * server.c (process_point_options): Stop at 'X' when parsing.
3538
961bd387
ME
35392012-07-19 Michael Eager <eager@eagercon.com>
3540
a261b8f5 3541 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3542 to hw_execute.
3543 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3544 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3545 hardware breakpoint.
3546
aa7c7447
JK
35472012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3548
3549 * gdbserver/linux-low.c (initialize_low): Call
3550 linux_ptrace_init_warnings.
3551
7f216e7c
DE
35522012-07-02 Doug Evans <dje@google.com>
3553
3554 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3555 pointer to int.
3556
d3ce09f5
SS
35572012-07-02 Stan Shebs <stan@codesourcery.com>
3558
3559 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3560 (ax.o): Add it to build rule.
3561 (ax-ipa.o): Ditto.
3562 (OBS): Add format.o.
3563 (IPA_OBS): Add format.o.
3564 * server.c (handle_query): Claim support for breakpoint commands.
3565 (process_point_options): Add command case.
3566 (process_serial_event): Leave running if there are printfs in
3567 effect.
3568 * mem-break.h (any_persistent_commands): Declare.
3569 (add_breakpoint_commands): Declare.
3570 (gdb_no_commands_at_breakpoint): Declare.
3571 (run_breakpoint_commands): Declare.
3572 * mem-break.c (struct point_command_list): New struct.
3573 (struct breakpoint): New field command_list.
3574 (any_persistent_commands): New function.
3575 (add_commands_to_breakpoint): New function.
3576 (add_breakpoint_commands): New function.
3577 (gdb_no_commands_at_breakpoint): New function.
3578 (run_breakpoint_commands): New function.
3579 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3580 locally.
3581 * ax.c: Include format.h.
3582 (ax_printf): New function.
3583 (gdb_eval_agent_expr): Add printf opcode.
3584
2f8f6aed
YQ
35852012-06-13 Yao Qi <yao@codesourcery.com>
3586
3587 * server.c (start_inferior): Remove duplicated writes to fields
3588 'last_resume_kind' and 'last_status' of 'current_inferior'.
3589
0c9070b3
YQ
35902012-06-12 Yao Qi <yao@codesourcery.com>
3591 Pedro Alves <palves@redhat.com>
3592
3593 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3594 comment.
3595 * server.c (handle_v_cont): Extend comment.
3596
c52daf70
YQ
35972012-06-11 Yao Qi <yao@codesourcery.com>
3598
3599 * linux-low.c (linux_attach): Add 'static'.
3600
d38bbb0a
YQ
36012012-06-06 Yao Qi <yao@codesourcery.com>
3602
3603 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3604
89dc0afd
JK
36052012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3606
3607 Fix gcc -flto compilation warning.
3608 * server.c (main): Make variable multi_mode and attach volatile.
3609
75f62ce7
TJB
36102012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3611
3612 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3613 if the platform doesn't know about it.
3614
65f479b6
PA
36152012-05-30 Jeff Kenton <jkenton@tilera.com>
3616
3617 * Makefile.in (SFILES): Add linux-tile-low.c.
3618 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3619 * configure.srv: Handle tilegx-*-linux*.
3620 * linux-tile-low.c: New file.
3621
0c5bf5a9
JK
36222012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3623
3624 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3625
a493e3e2
PA
36262012-05-24 Pedro Alves <palves@redhat.com>
3627
3628 PR gdb/7205
3629
43aaf8b6 3630 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3631
2ea28649
PA
36322012-05-24 Pedro Alves <palves@redhat.com>
3633
3634 PR gdb/7205
3635
3636 Replace target_signal with gdb_signal throughout.
3637
8d409d16
MR
36382012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3639
3640 * linux-low.c (linux_store_registers): Avoid the copying sequence
3641 when no data has been retrieved by ptrace.
3642
23512c01
MGD
36432012-05-22 Will Deacon <will.deacon@arm.com>
3644
3645 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3646 Include asm/ptrace.h.
3647 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3648 already defined.
3649
4934b29e
MR
36502012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3651
3652 * linux-low.c (linux_store_registers): Don't re-retrieve data
3653 with ptrace that has already been obtained from /proc. Always
3654 copy any data retrieved with ptrace to the buffer supplied.
3655
bde24c0a
PA
36562012-05-11 Yao Qi <yao@codesourcery.com>
3657 Pedro Alves <palves@redhat.com>
3658
3659 * linux-low.c (enum stopping_threads_kind): New.
3660 (stopping_threads): Change type to `enum stopping_threads_kind'.
3661 (handle_extended_wait): If stopping and suspending threads, leave
3662 the new_lwp suspended too.
3663 (linux_wait_for_event): Adjust.
3664 (stop_all_lwps): Set `stopping_threads' to
3665 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3666 whether we're suspending threads or just stopping them. Assert no
3667 recursion happens.
3668
623b6bdf
YQ
36692012-04-29 Yao Qi <yao@codesourcery.com>
3670
3671 * server.h: Move some code to ...
3672 * gdbthread.h: ... here. New.
3673 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3674 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3675 (nto-low.o, win32-low.o): Likewise.
3676 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3677 * regcache.c, remote-utils.c, server.c: Likewise.
3678 * target.c, tracepoint.c, win32-low.c: Likewise.
3679
f15f9948
TJB
36802012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3681
3682 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3683 (PTRACE_ARG4_TYPE): Likewise.
3684 (PTRACE_XFER_TYPE): Likewise.
3685 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3686 ptrace to PTRACE_ARG3_TYPE.
3687 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3688 (PTRACE_ARG4_TYPE): Likewise.
3689 (PTRACE_XFER_TYPE): Likewise.
3690 (linux_detach_one_lwp): Cast fourth argument of
3691 ptrace to long then PTRACE_ARG4_TYPE.
3692 (regsets_fetch_inferior_registers): Cast third argument of
3693 ptrace to long then PTRACE_ARG3_TYPE.
3694 (regsets_store_inferior_registers): Likewise.
3695
38ea300a
PA
36962012-04-20 Pedro Alves <palves@redhat.com>
3697
3698 * configure: Regenerate.
3699
c971b7fa
PA
37002012-04-19 Pedro Alves <palves@redhat.com>
3701
43aaf8b6 3702 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3703 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3704 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3705 (all, install-only, uninstall, clean-info, all-lib, clean): No
3706 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3707 (maintainer-clean realclean distclean): Use subdir_do.
3708 (subdir_do): New.
3709 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3710 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3711 * acinclude.m4: Include acx_configure_dir.m4.
3712 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3713 calls. Call AC_PROG_RANLIB. Configure gnulib using
3714 ACX_CONFIGURE_DIR.
3715 (GNULIB): New.
3716 (GNULIB_STDINT_H): Adjust.
3717 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3718 * gdbreplay.c: Include build-gnulib/config.h.
3719 * server.h: Likewise.
3720 * aclocal.m4: Regenerate.
3721 * config.in: Regenerate.
3722 * configure: Regenerate.
c971b7fa 3723
809277f8
PA
37242012-04-19 Pedro Alves <palves@redhat.com>
3725
3726 * Makefile.in (LIBGNU, INCGNU): Adjust.
3727 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3728 (all, install-only, uninstall, clean-info, all-lib, clean)
3729 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3730 * configure.ac: Adjust AC_OUTPUT output.
3731 * aclocal.m4: Regenerate.
3732 * configure: Regenerate.
3733
fd9bb8b8
PA
37342012-04-19 Pedro Alves <palves@redhat.com>
3735
3736 * Makefile.in (generated_files): New.
3737 (server_h): Remove the explicit dependency on config.h, and depend
3738 on $generated_files.
3739
1c298c66
PA
37402012-04-19 Pedro Alves <palves@redhat.com>
3741
3742 * Makefile.in (INCGNU): Add -Ignulib.
3743
57c4b50b
PA
37442012-04-19 Pedro Alves <palves@redhat.com>
3745
3746 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3747 (INCGNU): ... this, and spell out -I here.
3748 (GNULIB_LIB): Rename to ...
3749 (LIBGNU): ... this.
3750 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3751
1030e047
PA
37522012-04-19 Pedro Alves <palves@redhat.com>
3753
3754 * config.in: Regenerate.
3755
447d4319
PA
37562012-04-19 Pedro Alves <palves@redhat.com>
3757
3758 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3759 * server.h (memmem): Remove declaration.
3760 * config.in: Regenerate.
3761 * configure: Regenerate.
3762
aad9eab9
YQ
37632012-04-19 Yao Qi <yao@codesourcery.com>
3764
3765 * Makefile.in (SFILES): Add common/vec.c.
3766 (OBS): Add vec.o.
3767 (vec.o): New rule.
3768
3e10640f
YQ
37692012-04-19 Yao Qi <yao@codesourcery.com>
3770
3771 * remote-utils.c (prepare_resume_reply): Replace with macro
3772 target_core_of_thread.
3773 * server.c (handle_qxfer_threads_proper): Likewise.
3774 * target.h (traget_core_of_thread): New macro.
3775
71622373
PA
37762012-04-18 Pedro Alves <palves@redhat.com>
3777
3778 * aclocal.m4: Regenerate.
3779 * configure: Regenerate.
3780
80d26939
YQ
37812012-04-16 Yao Qi <yao@codesourcery.com>
3782
3783 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3784 duplicated on address.
3785
42476b70
YQ
37862012-04-16 Yao Qi <yao@codesourcery.com>
3787
3788 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3789 (struct tracepoint_action_ops) <send>: New field.
3790 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3791 (agent_expr_send, x_tracepoint_action_send): New.
3792 (l_tracepoint_action_send): New.
3793 (cmd_qtdp): Download and install tracepoint
3794 according to `use_agent'.
3795 (run_inferior_command): Add one more parameter `len'.
3796 Update callers.
3797 (tracepoint_send_agent): New.
3798 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3799
7bc83639
YQ
38002012-04-16 Yao Qi <yao@codesourcery.com>
3801
3802 * tracepoint.c (download_tracepoints): Moved to ...
3803 (cmd_qtstart): ... here.
3804
5f18041e
YQ
38052012-04-14 Yao Qi <yao@codesourcery.com>
3806
3807 * tracepoint.c: Include inttypes.h.
3808 (struct collect_memory_action): Use sized types.
3809 (struct tracepoint): Likewise.
3810 (cmd_qtdp, stop_tracing): Update print specifiers.
3811 (cmd_qtp, response_tracepoint): Likewise.
3812 (collect_data_at_tracepoint): Likewise.
3813 (collect_data_at_step): Likewise.
3814
55a8c076
YQ
38152012-04-14 Yao Qi <yao@codesourcery.com>
3816
3817 Import gnulib module inttypes.
3818 * aclocal.m4, config.in, configure: Regenerated.
3819
dc750257
YQ
38202012-04-14 Yao Qi <yao@codesourcery.com>
3821
3822 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3823 Makefile and config.status at last.
3824
0ab5faf9
YQ
38252012-04-13 Yao Qi <yao@codesourcery.com>
3826
3827 * tracepoint.c: Include stdint.h unconditionally.
3828
18f5fd81
TJB
38292012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3830
3831 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3832 on BFD_HAVE_SYS_PROCFS_TYPE.
3833 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3834 * configure: Regenerate.
3835 * config.in: Likewise.
3836
4d47af5c
L
38372012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3838
3839 * Makefile.in (clean): Also remove x32.c x32-linux.c
3840 x32-avx.c x32-avx-linux.c.
3841 (x32.o): New target.
3842 (x32.c): Likewise.
3843 (x32-linux.o): Likewise.
3844 (x32-linux.c): Likewise.
3845 (x32-avx.o): Likewise.
3846 (x32-avx.c): Likewise.
3847 (x32-avx-linux.o): Likewise.
3848 (x32-avx-linux.c): Likewise.
3849
3850 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3851 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3852 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3853 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3854 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3855 i386/x32-avx-linux.xml.
3856
3857 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3858 (init_registers_x32_avx_linux): Likwise.
3859 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3860 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3861
ecedbe58
PA
38622012-04-13 Pedro Alves <palves@redhat.com>
3863
3864 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3865 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3866 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3867 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3868 the sub-make.
3869
c92b5177
L
38702012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3871
3872 * linux-x86-low.c (compat_x32_clock_t): New.
3873 (compat_x32_siginfo_t): Likewise.
3874 (compat_x32_siginfo_from_siginfo): Likewise.
3875 (siginfo_from_compat_x32_siginfo): Likewise.
3876 (linux_is_elf64): Likewise.
3877 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3878 and siginfo_from_compat_x32_siginfo for x32.
3879 (x86_arch_setup): Set linux_is_elf64.
3880
214d508e
L
38812012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3882
3883 PR gdb/13969
3884 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3885 e_machine field.
3886 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3887 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3888 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3889 compatible with process.
3890
c9a1864a
YQ
38912012-04-12 Yao Qi <yao@codesourcery.com>
3892
3893 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3894 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3895 (install-only, install-info, clean): Handle sub dir gnulib.
3896 (all-lib, am--refresh): New targets.
3897 (memmem.o): Remove target.
3898 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3899 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3900 (AC_REPLACE_FUNCS): Remove memmem.
3901 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3902 (AC_OUTPUT): Generate Makefile in gnulib/.
3903 * aclocal.m4, config.in, configure: Regenerated.
3904
367ba2c2
MR
39052012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3906
3907 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3908
9d236627
PA
39092012-04-05 Pedro Alves <palves@redhat.com>
3910
3911 -Werror=strict-aliasing
3912
3913 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3914 pointer.
3915
111217b3
PA
39162012-04-04 Pedro Alves <palves@redhat.com>
3917
3918 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3919 (sparc_store_gregset_from_stack, sparc_store_gregset)
3920 (sparc_breakpoint_at): Fix formatting.
3921
8365dcf5
TJB
39222012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3923
3924 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3925 are available.
3926 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3927 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3928 * config.in: Regenerate.
3929 * configure: Likewise.
3930
689cc2ae
PA
39312012-03-29 Pedro Alves <palves@redhat.com>
3932
3933 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3934 Correct ptrace arguments.
3935
c14dfd32
PA
39362012-03-28 Pedro Alves <palves@redhat.com>
3937
3938 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3939 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3940 (IA64_FR1_REGNUM): New defines.
3941 (ia64_fetch_register): New.
3942 (the_low_target): Install it.
3943 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3944 field.
3945 * linux-low.c (linux_fetch_registers): Try the
3946 the_low_target.fetch_register hook first.
3947
3948 * linux-arm-low.c (the_low_target): Adjust.
3949 * linux-bfin-low.c (the_low_target): Adjust.
3950 * linux-cris-low.c (the_low_target): Adjust.
3951 * linux-crisv32-low.c (the_low_target): Adjust.
3952 * linux-m32r-low.c (the_low_target): Adjust.
3953 * linux-m68k-low.c (the_low_target): Adjust.
3954 * linux-mips-low.c (the_low_target): Adjust.
3955 * linux-ppc-low.c (the_low_target): Adjust.
3956 * linux-s390-low.c (the_low_target): Adjust.
3957 * linux-sh-low.c (the_low_target): Adjust.
3958 * linux-sparc-low.c (the_low_target): Adjust.
3959 * linux-tic6x-low.c (the_low_target): Adjust.
3960 * linux-x86-low.c (the_low_target): Adjust.
3961 * linux-xtensa-low.c (the_low_target): Adjust.
3962
63c88e13
PA
39632012-03-26 Pedro Alves <palves@redhat.com>
3964
3965 * server.c (handle_qxfer_libraries): Don't bail early if
3966 the_target->qxfer_libraries_svr4 is not NULL.
3967
fb723180
PA
39682012-03-26 Pedro Alves <palves@redhat.com>
3969
3970 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3971
0afae3cf
PA
39722012-03-23 Pedro Alves <palves@redhat.com>
3973
3974 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3975 "library-list-svr4" element's start tag when the the DSO list is
3976 empty.
3977
485f1ee4
PA
39782012-03-23 Pedro Alves <palves@redhat.com>
3979
3980 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3981 a variable whose type size is the same as the inferior's pointer
3982 size.
3983
a5362b9a
TS
39842012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3985
3986 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3987 struct siginfo.
3988 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3989 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3990 * linux-low.h: Include <signal.h>.
3991 (struct siginfo): Remove forward declaration.
3992 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3993 struct siginfo.
3994
d226c142
MF
39952012-03-21 Mike Frysinger <vapier@gentoo.org>
3996
3997 * .gitignore: Ignore more files.
3998
122f36ef
PA
39992012-03-19 Pedro Alves <palves@redhat.com>
4000 Jan Kratochvil <jan.kratochvil@redhat.com>
4001
4002 * server.c (cont_thread, general_thread): Add describing comments.
4003 (start_inferior): Clear `cont_thread'.
4004 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4005 of a process.
4006
fc3e5175
YQ
40072012-03-15 Yao Qi <yao@codesourcery.com>
4008
4009 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4010 handling to ...
4011 (cmd_qtdp): ... here.
4012
8d0d92cd
YQ
40132012-03-15 Yao Qi <yao@codesourcery.com>
4014
4015 * tracepoint.c (struct tracepoint_action_ops): New.
4016 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4017 (m_tracepoint_action_download): New.
4018 (r_tracepoint_action_download): New.
4019 (x_tracepoint_action_download): New.
4020 (l_tracepoint_action_download): New.
4021 (add_tracepoint_action): Install `action->ops' according type.
4022 (download_tracepoint_1): Move code `download' function pointer
4023 of various tracepoint_action_ops.
4024
87b0bb13
JK
40252012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4026
4027 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4028 linux_ptrace_attach_warnings.
4029
5f572dec
JK
40302012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4031
4032 * Makefile.in (linux-ptrace.o): New.
4033 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4034 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4035 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4036 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4037 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4038 of these targets.
4039 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4040
f4647387
YQ
40412012-03-08 Yao Qi <yao@codesourcery.com>
4042 Pedro Alves <palves@redhat.com>
4043
4044 Fix PR server/13392.
4045 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4046 offset of JMP insn.
4047 * tracepoint.c (remove_tracepoint): New.
4048 (cmd_qtdp): Call remove_tracepoint when failed to install.
4049
9b224c5e
PA
40502012-03-07 Pedro Alves <palves@redhat.com>
4051
4052 * linux-low.c (get_detach_signal): New.
4053 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4054 Pass on pending signals to PTRACE_DETACH. Check the result of the
4055 ptrace call.
4056 * server.c (program_signals, program_signals_p): New.
4057 (handle_general_set): Handle QProgramSignals.
4058 * server.h (program_signals, program_signals_p): Declare.
4059
e237a7e2
JK
40602012-03-05 Pedro Alves <palves@redhat.com>
4061 Jan Kratochvil <jan.kratochvil@redhat.com>
4062
4063 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4064 New comment why.
4065
5808517f
YQ
40662012-03-03 Yao Qi <yao@codesourcery.com>
4067
4068 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4069 agent_look_up_symbols.
4070
58b4daa5
YQ
40712012-03-03 Yao Qi <yao@codesourcery.com>
4072
4073 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4074 (linux-x86-low.o): Likewise.
4075 * server.h: Remove in_process_agent_loaded.
4076 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4077 common/agent.c.
4078 Update callers.
4079
8ffcbaaf
YQ
40802012-03-03 Yao Qi <yao@codesourcery.com>
4081
4082 * tracepoint.c (gdb_agent_capability): New global.
4083 (in_process_agent_loaded_ust): Renamed to
4084 `in_process_agent_supports_ust'.
4085 Update callers.
4086 (in_process_agent_supports_ust): Call agent_capability_check.
4087 (clear_installed_tracepoints): Assert that agent supports
4088 agent.
4089
d1feda86
YQ
40902012-03-03 Yao Qi <yao@codesourcery.com>
4091
4092 * linux-low.c (linux_supports_agent): New.
4093 (linux_target_ops): Initialize field `supports_agent' with
4094 linux_supports_agent.
4095 * target.h (struct target_ops) <supports_agent>: New.
4096 (target_supports_agent): New macro.
4097 * server.c (handle_general_set): Handle packet 'QAgent'.
4098 (handle_query): Send `QAgent+'.
4099 * Makefile.in (server.o): Depends on agent.h.
4100
2fa291ac
YQ
41012012-03-03 Yao Qi <yao@codesourcery.com>
4102
4103 * Makefile.in (OBS): Add agent.o.
4104 Add new rule for agent.o.
4105 Track dependence of tracepoint.c on agent.h.
4106 * tracepoint.c (run_inferior_command_1):
4107 (run_inferior_command): Call agent_run_command.
4108 (gdb_ust_connect_sync_socket): Deleted. Move it to
4109 common/agent.c.
4110 (resume_thread, stop_thread): Likewise.
4111 (gdb_ust_socket_init): Renamed to ...
4112 (gdb_agent_socket_init): ... New.
4113 (gdb_ust_thread): Renamed to ...
4114 (gdb_agent_helper_thread): ... New.
4115 (gdb_ust_init): Move some code to ...
4116 (gdb_agent_init): ... here. New.
4117 [HAVE_UST]: Call gdb_ust_init.
4118 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4119 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4120 * config.in, configure: Regenerated.
4121
05044653
PA
41222012-03-02 Pedro Alves <palves@redhat.com>
4123
4124 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4125 * linux-low.c (struct simple_pid_list): New.
4126 (stopped_pids): New a struct simple_pid_list pointer.
4127 (add_to_pid_list, pull_pid_from_list): New.
4128 (handle_extended_wait): Don't assume the first signal new children
4129 report is SIGSTOP. Adjust call to pull_pid_from_list.
4130 (linux_wait_for_lwp): Adjust.
4131
8d00225b
YQ
41322012-03-02 Yao Qi <yao@codesourcery.com>
4133
4134 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4135 debug log.
4136
19560ba5
YQ
41372012-03-02 Yao Qi <yao@codesourcery.com>
4138
4139 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4140 `stop_pc' and `tpoint'. Update caller.
4141
1faeff08
MR
41422012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4143
4144 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4145 * linux-low.c (use_linux_regsets): New macro.
4146 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4147 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4148 (linux_register_in_regsets): New function.
4149 (usr_fetch_inferior_registers): Skip registers covered by
4150 regsets.
4151 (usr_store_inferior_registers): Likewise.
4152 (usr_fetch_inferior_registers): New macro.
4153 (usr_store_inferior_registers): Likewise.
4154 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4155 (linux_store_registers): Likewise.
4156 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4157 prototype.
4158 (init_registers_mips64_dsp_linux): Likewise.
4159 (init_registers_mips_linux): New macro.
4160 (init_registers_mips_dsp_linux): Likewise.
4161 (mips_dsp_num_regs): Likewise.
4162 (DSP_BASE, DSP_CONTROL): New fallback macros.
4163 (mips_base_regs): New macro.
4164 (mips_regmap): Use it. Fix the size.
4165 (mips_dsp_regmap): New variable.
4166 (mips_dsp_regset_bitmap): Likewise.
4167 (mips_arch_setup): New function.
4168 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4169 than mips_regmap.
4170 (mips_cannot_store_register): Likewise.
4171 (the_low_target): Update .arch_setup, .num_regs and .regmap
4172 initializers. Add .regset_bitmap initializer.
4173 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4174 initializer.
4175 * linux-bfin-low.c (the_low_target): Likewise.
4176 * linux-cris-low.c (the_low_target): Likewise.
4177 * linux-crisv32-low.c (the_low_target): Likewise.
4178 * linux-ia64-low.c (the_low_target): Likewise.
4179 * linux-m32r-low.c (the_low_target): Likewise.
4180 * linux-m68k-low.c (the_low_target): Likewise.
4181 * linux-ppc-low.c (the_low_target): Likewise.
4182 * linux-s390-low.c (the_low_target): Likewise.
4183 * linux-sh-low.c (the_low_target): Likewise.
4184 * linux-sparc-low.c (the_low_target): Likewise.
4185 * linux-tic6x-low.c (the_low_target): Likewise.
4186 * linux-x86-low.c (the_low_target): Likewise.
4187 * linux-xtensa-low.c (the_low_target): Likewise.
4188 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4189 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4190 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4191 srv_xmlfiles.
4192 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4193 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4194
c03e6ccc
YQ
41952012-02-29 Yao Qi <yao@codesourcery.com>
4196 Pedro Alves <palves@redhat.com>
4197
4198 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4199 `step_over_finished' is true.
4200
644cebc9
PA
42012012-02-27 Pedro Alves <palves@redhat.com>
4202
4203 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4204 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4205
c14d7ab2
PA
42062012-02-27 Pedro Alves <palves@redhat.com>
4207
4208 PR server/9684
4209 * linux-low.c (pid_is_stopped): New.
4210 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4211
412c89dd
LM
42122012-02-25 Luis Machado <lgustavo@codesourcery.com>
4213
4214 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4215 of conditions.
4216
b745defe
MR
42172012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4218
4219 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4220
9f3a5c85
LM
42212012-02-24 Luis Machado <lgustavo@codesourcery>
4222
4223 * server.c (handle_query): Advertise support for target-side
4224 breakpoint condition evaluation.
4225 (process_point_options): New function.
4226 (process_serial_event): When inserting a breakpoint, check for
4227 a target-side condition that should be evaluated.
4228
4229 * mem-break.c: Include regcache.h and ax.h.
4230 (point_cond_list_t): New data structure.
4231 (breakpoint) <cond_list>: New field.
4232 (find_gdb_breakpoint_at): Make non-static.
4233 (delete_gdb_breakpoint_at): Clear any target-side
4234 conditions.
4235 (clear_gdb_breakpoint_conditions): New function.
4236 (add_condition_to_breakpoint): Likewise.
4237 (add_breakpoint_condition): Likewise.
4238 (gdb_condition_true_at_breakpoint): Likewise.
4239 (gdb_breakpoint_here): Return result directly instead
4240 of going through a local variable.
4241
4242 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4243 (clear_gdb_breakpoint_conditions): Likewise.
4244 (add_breakpoint_condition): Likewise.
4245 (gdb_condition_true_at_breakpoint): Likewise.
4246
4247 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4248 (need_step_over_p): Take target-side breakpoint condition into
4249 consideration.
4250
5e1dc496
LM
42512012-02-24 Luis Machado <lgustavo@codesourcery>
4252
4253 * server.h: Include tracepoint.h.
4254 (agent_mem_read, agent_get_trace_state_variable_value,
4255 agent_set_trace_state_variable_value,
4256 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4257 get_set_tsv_func_addr): New prototypes.
4258
4259 * ax.h: New include file.
4260 * ax.c: New source file.
4261
4262 * tracepoint.c: Include ax.h.
4263 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4264 agent_expr, eval_result_type): Move to ax.h.
4265 (parse_agent_expr): Rename to ...
4266 (gdb_parse_agent_expr): ... this, make it non-static and move
4267 to ax.h.
4268 (unparse_agent_expr) Rename to ...
4269 (gdb_unparse_agent_expr): ... this, make it non-static and move
4270 to ax.h.
4271 (eval_agent_expr): Rename to ...
4272 (eval_tracepoint_agent_expr): ... this.
4273 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4274 forward declarations.
4275 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4276 (agent_get_trace_state_variable_value): New function.
4277 (agent_set_trace_state_variable_value): New function.
4278 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4279 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4280 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4281 (condition_true_at_tracepoint): Likewise.
4282 (parse_agent_expr): Rename to ...
4283 (gdb_parse_agent_expr): ... this and move to ax.c.
4284 (unparse_agent_expr): Rename to ...
4285 (gdb_unparse_agent_expr): ... this and move to ax.c.
4286 (gdb_agent_op_name): Move to ax.c.
4287 (eval_agent_expr): Rename to ...
4288 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4289 and move to ax.c.
4290 (eval_tracepoint_agent_expr): New function.
4291 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4292 non-static.
5e1dc496
LM
4293 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4294 ax.c.
4295 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4296 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4297 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4298 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4299 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4300 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4301 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4302 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4303 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4304 (compile_bytecodes): Remove forward declaration.
4305 (is_goto_target): Move to ax.c.
4306 (compile_bytecodes): Move to ax.c and call
4307 agent_get_trace_state_variable_value (...) and
4308 agent_set_trace_state_variable_value (...).
4309
4310 * Makefile.in: Update ax.c and IPA dependencies.
4311
277e4e52
PA
43122012-02-24 Pedro Alves <palves@redhat.com>
4313
4314 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4315 (cmd_bigqtbuffer_circular): ... this. Only handle
4316 'QTBuffer:circular:'.
4317 (handle_tracepoint_general_set): Adjust.
4318
bf4c19f7
YQ
43192012-02-16 Yao Qi <yao@codesourcery.com>
4320
4321 * inferiors.c: Move code to ...
4322 * dll.c: .... here. New.
4323 * server.h: Declare clear_dlls.
4324 * Makefile.in (SFILES): Add dll.c.
4325 (OBS): Add dll.o
4326 (dll.o): New rule.
4327
d73f2619
YQ
43282012-02-11 Yao Qi <yao@codesourcery.com>
4329
4330 * server.c: (handle_monitor_command): Add a new parameter
4331 `own_buf'.
4332 (handle_query): Update caller.
4333
f8255c2a
JB
43342012-02-09 Joel Brobecker <brobecker@adacore.com>
4335
4336 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4337 * configure, config.in: Regenerate.
4338 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4339 is not defined.
4340
da84f473
PA
43412012-02-02 Pedro Alves <palves@redhat.com>
4342
4343 Try SIGKILL first, then PTRACE_KILL.
4344 * linux-low.c (linux_kill_one_lwp): New.
4345 (linux_kill_one_lwp): Rename to ...
4346 (kill_one_lwp_callback): ... this. Use the new
4347 linux_kill_one_lwp.
4348
e886a173
PA
43492012-02-02 Pedro Alves <palves@redhat.com>
4350
4351 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4352 inferior.
4353
be07f1a2
PA
43542012-01-27 Pedro Alves <palves@redhat.com>
4355
4356 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4357 (elf_64_file_p): Make static.
4358 (linux_pid_exe_is_elf_64_file): New.
4359 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4360 Delete declarations.
4361 (linux_pid_exe_is_elf_64_file): Declare.
4362 * linux-x86-low.c (x86_arch_setup): Use
4363 linux_pid_exe_is_elf_64_file.
4364
d8301ad1
JK
43652012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4366
4367 * linux-low.c (linux_wait_for_event_1): Rename to ...
4368 (linux_wait_for_event): ... here and merge it with former
4369 linux_wait_for_event - new variable wait_ptid, use it.
4370 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4371
01b17894
PA
43722012-01-23 Pedro Alves <palves@redhat.com>
4373
4374 * server.c (main): Avoid yet another case of infinite loop while
4375 detaching/killing after a longjmp.
4376
e825046f
JK
43772012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4378
4379 Code cleanup.
4380 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4381
b9e7b9c3
UW
43822012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4383
4384 * hostio.c (handle_readlink): New function.
4385 (handle_vFile): Call it to handle "vFile:readlink" packets.
4386
901f9912
UW
43872012-01-20 Pedro Alves <palves@redhat.com>
4388 Ulrich Weigand <ulrich.weigand@linaro.org>
4389
4390 * server.c (handle_v_requests): Only support vAttach and vRun to
4391 start multiple processes when in extended protocol mode.
4392
fc1ab1a0
PA
43932012-01-17 Pedro Alves <palves@redhat.com>
4394
4395 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4396 memalign plus mprotect to allocate the scratch buffer.
4397
7d5d4e98
PA
43982012-01-13 Pedro Alves <palves@redhat.com>
4399
4400 * server.c (attach_inferior): Clear `cont_thread'.
4401
f128d5e9
PA
44022012-01-13 Pedro Alves <palves@redhat.com>
4403
4404 * server.c (main): Avoid infinite loop while detaching/killing
4405 after a longjmp.
4406
06db92f0
DE
44072012-01-09 Doug Evans <dje@google.com>
4408
4409 * server.c (start_inferior): Set last_ptid in --wrapper case.
4410
32d92999
YQ
44112012-01-06 Yao Qi <yao@codesourcery.com>
4412
4413 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4414 defined.
4415 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4416
5e0a92a9
YQ
44172012-01-04 Yao Qi <yao@codesourcery.com>
4418
4419 * tracepoint.c (cmd_qtdp): Print debug message
4420 for static tracepoint.
4421
ae639e8c
YQ
44222012-01-04 Yao Qi <yao@codesourcery.com>
4423
4424 * tracepoint.c (trace_vdebug): Differentiate debug message
4425 between gdbserver and IPA.
4426
f72429c5
YQ
44272012-01-03 Yao Qi <yao@codesourcery.com>
4428
4429 * tracepoint.c (tracepoint_was_hit): Don't collect for
4430 static tracepoint.
4431
12c3e59c
JB
44322012-01-02 Joel Brobecker <brobecker@adacore.com>
4433
4434 * terminal.h: Reformat copyright header.
4435
67827812
JB
44362012-01-02 Joel Brobecker <brobecker@adacore.com>
4437
4438 * server.c (gdbserver_version): Update copyright year.
4439 * gdbreplay.c (gdbreplay_version): Likewise.
4440
3e52c33d
JK
44412011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4442
4443 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4444
4445 Revert:
4446 2011-12-18 Hui Zhu <teawater@gmail.com>
4447 * linux-low.c (linux_create_inferior): Save return value to ret.
4448
66f1260e
HZ
44492011-12-18 Hui Zhu <teawater@gmail.com>
4450
4451 * linux-low.c (linux_create_inferior): Save return value to ret.
4452
e77616d7
DE
44532011-12-16 Doug Evans <dje@google.com>
4454
e7b06c57
DE
4455 * linux-low.c (linux_create_inferior): If stdio connection,
4456 redirect stdin from /dev/null, stdout to stderr.
4457 * remote-utils.c (remote_is_stdio): New static global.
4458 (remote_connection_is_stdio): New function.
4459 (remote_prepare): Handle stdio connection.
4460 (remote_open): Ditto.
4461 (remote_close): Don't close stdin for stdio connections.
4462 (read_prim,write_prim): New functions. Replace all calls to
4463 read/write to these.
4464 * server.c (main): Watch for "-" argument. Move call to
4465 remote_prepare before start_inferior.
4466 * server.h (STDIO_CONNECTION_NAME): New macro.
4467 (remote_connection_is_stdio): Declare.
4468
e77616d7
DE
4469 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4470 in debugging output.
4471
82067193
YQ
44722011-12-15 Yao Qi <yao@codesourcery.com>
4473
4474 * tracepoint.c: Include sys/syscall.h.
4475 (gdb_ust_thread): Remove preprocessor conditional.
4476
82bfbe7e
PA
44772011-12-14 Pedro Alves <pedro@codesourcery.com>
4478
4479 * linux-low.c (linux_detach_one_lwp): Call
4480 the_low_target.prepare_to_resume before detaching.
4481
712c6575
YQ
44822011-12-14 Yao Qi <yao@codesourcery.com>
4483
4484 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4485 of write.
4486
d54d1edf
YQ
44872011-12-14 Yao Qi <yao@codesourcery.com>
4488
4489 * i386-low.c (i386_low_stopped_data_address): Initialize local
4490 variable `control'.
4491
6210a125
PA
44922011-12-13 Pedro Alves <pedro@codesourcery.com>
4493
4494 PR remote/13492
4495
4496 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4497 DR_CONTROL unless necessary. Extend comments.
4498 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4499 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4500
2ece8244
YQ
45012011-12-13 Yao Qi <yao@codesourcery.com>
4502
4503 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4504 macros.
4505 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4506
784867a5
JK
45072011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4508
4509 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4510 Print new debug message for such case.
4511
6bf36717
JK
45122011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4513
4514 Fix overlapping memcpy.
4515 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4516 the read_inferior_memory transfer.
4517 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4518 write_inferior_memory transfer.
4519 (set_fast_tracepoint_jump): New variable buf. Use it for the
4520 read_inferior_memory and write_inferior_memory transfers.
4521 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4522 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4523 Use it for the write_inferior_memory transfer.
4524 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4525 buffers.
4526
50275556
MR
45272011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4528
4529 * linux-low.c (fetch_register, store_register): Make code
4530 consistent, fix formatting.
4531
7325beb4
MR
45322011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4533
4534 * linux-low.c (usr_store_inferior_registers): Factor out code
4535 to handle individual registers into...
4536 (store_register): ... this new function.
4537
c642a434
UW
45382011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4539
4540 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4541 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4542 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4543 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4544 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4545 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4546 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4547 (srv_xmlfiles): Add new XML files.
4548
4549 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4550 and <sys/uio.h>.
4551 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4552 (init_registers_s390_linux32v1): Add prototype.
4553 (init_registers_s390_linux32v2): Likewise.
4554 (init_registers_s390_linux64v1): Likewise.
4555 (init_registers_s390_linux64v2): Likewise.
4556 (init_registers_s390x_linux64v1): Likewise.
4557 (init_registers_s390x_linux64v2): Likewise.
4558 (s390_num_regs): Increment to 52.
4559 (s390_regmap): Add orig_r2 register.
4560 (s390_num_regs_3264): Increment to 68.
4561 (s390_regmap_3264): Add orig_r2 register.
4562 (s390_collect_ptrace_register): Handle orig_r2 register.
4563 (s390_supply_ptrace_register): Likewise.
4564 (s390_fill_last_break): New function.
4565 (s390_store_last_break): Likewise.
4566 (s390_fill_system_call): New function.
4567 (s390_store_system_call): Likewise.
4568 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4569 register sets.
4570 (s390_check_regset): New function.
4571 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4572 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4573 Update target_regsets for available register sets.
4574
2268b414
JK
45752011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4576 Jan Kratochvil <jan.kratochvil@redhat.com>
4577
4578 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4579 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4580 New.
4581 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4582 * linux-low.h (struct process_info_private): New member r_debug.
4583 * server.c (handle_qxfer_libraries): Call
4584 the_target->qxfer_libraries_svr4.
4585 (handle_qxfer_libraries_svr4): New function.
4586 (qxfer_packets): New entry "libraries-svr4".
4587 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4588 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4589 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4590 PACKET_qXfer_libraries_svr4.
4591
d6db1fab
UW
45922011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4593
4594 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4595 PSW address/mask between 8-byte and 16-byte formats.
4596 (s390_supply_ptrace_register): Likewise.
4597 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4598 basic addressing mode bit.
4599
242f5f1c
SS
46002011-11-24 Stan Shebs <stan@codesourcery.com>
4601
4602 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4603
f196051f
SS
46042011-11-17 Stan Shebs <stan@codesourcery.com>
4605
4606 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4607 (tracing_start_time): New global.
4608 (tracing_stop_time): New global.
4609 (tracing_user_name): New global.
4610 (tracing_notes): New global.
4611 (tracing_stop_note): New global.
4612 (cmd_qtstart): Set traceframe_usage, start_time.
4613 (stop_tracing): Set stop_time.
4614 (cmd_qtstatus): Report additional status.
4615 (cmd_qtp): New function.
4616 (handle_tracepoint_query): Call it.
4617 (cmd_qtnotes): New function.
4618 (handle_tracepoint_general_set): Call it.
4619 (get_timestamp): Rename from tsv_get_timestamp.
4620
405f8e94
SS
46212011-11-14 Stan Shebs <stan@codesourcery.com>
4622 Kwok Cheung Yeung <kcy@codesourcery.com>
4623
4624 * linux-x86-low.c (small_jump_insn): New.
4625 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4626 trampoline and error message, build a trampoline and issue a small
4627 jump instruction to it.
4628 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4629 trampoline and error message.
4630 (x86_get_min_fast_tracepoint_insn_len): New.
4631 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4632 * linux-low.h (struct linux_target_ops): Add arguments to
4633 install_fast_tracepoint_jump_pad operation, add new operation.
4634 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4635 arguments.
4636 (linux_get_min_fast_tracepoint_insn_len): New function.
4637 (linux_target_op): Add new operation.
4638 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4639 (gdb_trampoline_buffer_end): Ditto.
4640 (gdb_trampoline_buffer_error): Ditto.
4641 (struct ipa_sym_addresses): Add fields for new IPA variables.
4642 (symbol_list): Add entries for new IPA variables.
4643 (struct tracepoint): Add fields to hold the address range of the
4644 trampoline used by the tracepoint.
4645 (trampoline_buffer_head): New static variable.
4646 (trampoline_buffer_tail): Ditto.
4647 (claim_trampoline_space): New function.
4648 (have_fast_tracepoint_trampoline_buffer): New function.
4649 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4650 structure.
4651 (install_fast_tracepoint): Ditto, also add error buffer argument.
4652 (cmd_qtminftpilen): New function.
4653 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4654 (fast_tracepoint_from_trampoline_address): New function.
4655 (fast_tracepoint_collecting): Handle trampoline as part of jump
4656 pad space.
4657 (set_trampoline_buffer_space): New function.
4658 (initialize_tracepoint): Initialize new IPA variables.
4659 * target.h (struct target_ops): Add arguments to
4660 install_fast_tracepoint_jump_pad operation, add new
4661 get_min_fast_tracepoint_insn_len operation.
4662 (target_get_min_fast_tracepoint_insn_len): New.
4663 (install_fast_tracepoint_jump_pad): Add arguments.
4664 * server.h (IPA_BUFSIZ): Define.
4665 * linux-i386-ipa.c: Include extra header files.
4666 (initialize_fast_tracepoint_trampoline_buffer): New function.
4667 (initialize_low_tracepoint): Call it.
4668 * server.h (set_trampoline_buffer_space): Declare.
4669 (claim_trampoline_space): Ditto.
4670 (have_fast_tracepoint_trampoline_buffer): Ditto.
4671
1e4d1764
YQ
46722011-11-14 Yao Qi <yao@codesourcery.com>
4673
4674 * server.c (handle_query): Handle InstallInTrace for qSupported.
4675 * tracepoint.c (add_tracepoint): Sort list.
4676 (install_tracepoint, download_tracepoint): New.
4677 (cmd_qtdp): Call them to install and download tracepoints.
4678 (sort_tracepoints): Removed.
4679 (cmd_qtstart): Update.
4680
5c73ff4e
YQ
46812011-11-14 Yao Qi <yao@codesourcery.com>
4682
4683 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4684 * mem-break.h: Declare.
4685 * tracepoint.c (cmd_qtstart): Move some code to ...
4686 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4687 New.
4688 (download_tracepoints): Move some code to ...
4689 (download_tracepoint_1): ... here. New.
4690
86a30030
YQ
46912011-11-08 Yao Qi <yao@codesourcery.com>
4692
4693 * remote-utils.c (relocate_instruction): A comment fix.
4694
8d26e50c
JB
46952011-11-07 Joel Brobecker <brobecker@adacore.com>
4696
4697 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4698 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4699 dr_status_mirror and dr_control_mirror from debug_reg_state.
4700 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4701 (i386_initial_stuff): Remove use of deleted globals.
4702 (i386_get_thread_context, i386_set_thread_context,
4703 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4704 from debug_reg_state.
4705
a59306a3
YQ
47062011-11-05 Yao Qi <yao@codesourcery.com>
4707
4708 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4709 address as TPOINT's.
4710
3065dfb6
SS
47112011-11-02 Stan Shebs <stan@codesourcery.com>
4712
4713 * tracepoint.c (agent_mem_read_string): New function.
4714 (eval_agent_expr): Call it for tracenz.
4715 * server.c (handle_query): Report support for tracenz.
4716
fd0d8c7c
YQ
47172011-11-02 Yao Qi <yao@codesourcery.com>
4718
4719 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4720
609086b1
YQ
47212011-11-02 Yao Qi <yao@codesourcery.com>
4722
4723 * target.h: Fix a typo in comment.
4724
b9fd1791
PA
47252011-10-31 Pedro Alves <pedro@codesourcery.com>
4726
4727 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4728 clobber the breakpoints' shadows with fast tracepoint jumps.
4729 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4730 * target.c (write_inferior_memory): Also pass MYADDR down to
4731 check_mem_write.
4732
03583c20
UW
47332011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4734
4735 * configure.ac: Check support for personality routine.
4736 * configure: Regenerate.
4737 * config.in: Likewise.
4738 * linux-low.c: Include <sys/personality.h>.
4739 Define ADDR_NO_RANDOMIZE if necessary.
4740 (linux_create_inferior): Disable address space randomization when
4741 forking inferior, if requested.
4742 (linux_supports_disable_randomization): New function.
4743 (linux_target_ops): Install it.
4744 * server.h (disable_randomization): Declare.
4745 * server.c (disable_randomization): New global variable.
4746 (handle_general_set): Handle QDisableRandomization.
4747 (handle_query): Likewise for qSupported.
4748 (main): Support --disable-randomization and --no-disable-randomization
4749 command line arguments.
4750 * target.h (struct target_ops): Add supports_disable_randomization.
4751 (target_supports_disable_randomization): New macro.
4752
723b724b
MF
47532011-09-29 Mike Frysinger <vapier@gentoo.org>
4754
4755 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4756 ifdef check.
4757 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4758 [!PT_GETDSBT] (target_loadmap): New definition.
4759 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4760 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4761 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4762 and PT_GETDSBT to LINUX_LOADMAP.
4763 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4764 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4765
55329a5c 47662011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4767
4768 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4769 (arm_linux_hwbp_cap): New static variable.
4770 (arm_linux_get_hwbp_cap): Replace by ...
4771 (arm_linux_init_hwbp_cap): ... this new function.
4772 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4773 (arm_linux_get_hw_watchpoint_count): Likewise.
4774 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4775 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4776 (arm_prepare_to_resume): Use perror_with_name instead of error.
4777
55329a5c 47782011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
4779
4780 * linux-arm-low.c: Include <signal.h>.
4781 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4782 (struct arm_linux_hwbp_cap): New data type.
4783 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4784 (struct arm_linux_hw_breakpoint): New data type.
4785 (MAX_BPTS, MAX_WPTS): Define.
4786 (struct arch_process_info, struct arch_lwp_info): New data types.
4787 (arm_linux_get_hwbp_cap): New function.
4788 (arm_linux_get_hw_breakpoint_count): Likewise.
4789 (arm_linux_get_hw_watchpoint_count): Likewise.
4790 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4791 (arm_hwbp_control_initialize): Likewise.
4792 (arm_hwbp_control_is_enabled): Likewise.
4793 (arm_hwbp_control_is_initialized): Likewise.
4794 (arm_hwbp_control_disable): Likewise.
4795 (arm_linux_hw_breakpoint_equal): Likewise.
4796 (arm_linux_hw_point_initialize): Likewise.
4797 (struct update_registers_data): New data structure.
4798 (update_registers_callback: New function.
4799 (arm_insert_point): Likewise.
4800 (arm_remove_point): Likewise.
4801 (arm_stopped_by_watchpoint): Likewise.
4802 (arm_stopped_data_address): Likewise.
4803 (arm_new_process): Likewise.
4804 (arm_new_thread): Likewise.
4805 (arm_prepare_to_resume): Likewise.
4806 (the_low_target): Register arm_insert_point, arm_remove_point,
4807 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4808 arm_new_thread, and arm_prepare_to_resume.
4809
6b9801d4
SS
48102011-09-15 Stan Shebs <stan@codesourcery.com>
4811
4812 * server.h (struct emit_ops): Add compare-goto fields.
4813 * tracepoint.c (gdb_agent_op_sizes): New table.
4814 (emit_eq_goto): New function.
4815 (emit_ne_goto): New function.
4816 (emit_lt_goto): New function.
4817 (emit_le_goto): New function.
4818 (emit_gt_goto): New function.
4819 (emit_ge_goto): New function.
4820 (is_goto_target): New function.
4821 (compile_bytecodes): Recognize special cases of compare-goto
4822 combinations and call specialized emitters for them.
4823 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4824 (amd64_emit_ne_goto): New function.
4825 (amd64_emit_lt_goto): New function.
4826 (amd64_emit_le_goto): New function.
4827 (amd64_emit_gt_goto): New function.
4828 (amd64_emit_ge_goto): New function.
4829 (amd64_emit_ops): Add the new functions.
4830 (i386_emit_eq_goto): New function.
4831 (i386_emit_ne_goto): New function.
4832 (i386_emit_lt_goto): New function.
4833 (i386_emit_le_goto): New function.
4834 (i386_emit_gt_goto): New function.
4835 (i386_emit_ge_goto): New function.
4836 (i386_emit_ops): Add the new functions.
4837
bf15cbda
SS
48382011-09-08 Stan Shebs <stan@codesourcery.com>
4839
4840 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4841 (i386_emit_epilogue): Restore %ebx.
4842
943ca1dd
JZ
48432011-08-31 Jie Zhang <jzhang918@gmail.com>
4844
4845 * server.c (step_thread): Remove definition.
4846 (process_serial_event): Don't handle Hs.
4847 * server.h (step_thread): Remove declaration.
4848 * target.c (set_desired_inferior): Remove use of step_thread.
4849
e3deef73
LM
48502011-08-24 Luis Machado <lgustavo@codesourcery.com>
4851
4852 * linux-low.c: Include linux-procfs.h.
4853 (linux_attach_lwp_1): Update comments.
4854 (linux_attach): Scan for existing threads when attaching to a
4855 process that is the tgid.
4856 * Makefile.in: Update dependencies.
4857
13da1c97
LM
48582011-08-24 Luis Machado <lgustavo@codesourcery.com>
4859
4860 * configure.srv: Add linux-procfs.o dependencies.
4861
881127c9
YQ
48622011-08-14 Yao Qi <yao@codesourcery.com>
4863
4864 * target.h (struct target_ops): Fix indent.
4865 * win32-low.c (win32_target_ops): Fix comment.
4866
58dbd541
YQ
48672011-08-14 Andrew Jenner <andrew@codesourcery.com>
4868 Yao Qi <yao@codesourcery.com>
4869
4870 * Makefile.in (clean): Remove tic6x-*.c files.
4871 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4872 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4873 (tic6x-c64xp-linux.c): Likewise.
4874 * configure.srv: Add support for tic6x-*-uclinux.
4875 * linux-tic6x-low.c: New.
4876 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4877
78d85199
YQ
48782011-08-14 Andrew Stubbs <ams@codesourcery.com>
4879 Yao Qi <yao@codesourcery.com>
4880
4881 * target.h (struct target_ops): Add read_loadmap.
4882 * linux-low.c (struct target_loadseg): New type.
4883 (struct target_loadmap): New type.
4884 (linux_read_loadmap): New function.
4885 (linux_target_ops): Add linux_read_loadmap.
4886 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
4887 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4888 to NULL.
78d85199 4889
a959a88d
EZ
48902011-08-05 Eli Zaretskii <eliz@gnu.org>
4891
4892 * win32-low.c: Include <stdint.h>.
4893
1ced966e
PA
48942011-07-22 Pedro Alves <pedro@codesourcery.com>
4895
4896 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4897 to the inferior here.
4898 (i386_remove_aligned_watchpoint): Ditto.
4899 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4900 fit part of the watchpoint in the debug registers.
4901 (i386_update_inferior_debug_regs): New.
4902 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4903 registers, and only update the inferior on success.
4904 (i386_low_remove_watchpoint): Ditto.
4905
d26e3629
KY
49062011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4907
4908 * linux-low.c (compare_ints, unique, list_threads, show_process,
4909 linux_core_of_thread): Delete.
4910 (linux_target_ops): Change linux_core_of_thread to
4911 linux_common_core_of_thread.
4912 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4913 * utils.c (malloc_failure): Change type of argument.
4914 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4915 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4916 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4917 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4918 (IPA_OBJS): Add common-utils-ipa.o.
4919 (ptid_h, linux_osdata_h): New macros.
4920 (server_h): Add common/common-utils.h, common/xml-utils.h,
4921 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4922 common/ptid.h.
4923 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4924 ptid.o, buffer.o): New rules.
4925 (linux-low.o): Add common/linux-osdata.h as a dependency.
4926 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4927 * configure.ac: Add AC_HEADER_DIRENT check.
4928 * config.in: Regenerate.
4929 * configure: Regenerate.
4930 * remote-utils.c (xml_escape_text): Delete.
4931 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4932 buffer_xml_printf): Move to common/buffer.c.
4933 * server.c (main): Remove call to initialize_inferiors.
4934 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4935 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4936 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4937 internal_error, gdb_assert, gdb_assert_fail): Delete.
4938 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4939 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4940 common/buffer.h.
4941 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4942 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4943 initialize_inferiors): Delete.
4944
2275a1a7
PA
49452011-07-20 Pedro Alves <pedro@codesourcery.com>
4946
4947 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4948 symbol error.
4949
0a5b1e09
PA
49502011-05-31 Pedro Alves <pedro@codesourcery.com>
4951
4952 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4953 assertion.
4954 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4955
6938fd34
YQ
49562011-05-26 Yao Qi <yao@codesourcery.com>
4957
4958 * Makefile.in (thread-db.o): Track dependence to
4959 common/gdb_thread_db.h.
4960 * thread-db.c: include gdb_thread_db.h from right place.
4961
b481f9e0
TT
49622011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4963
4964 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4965 __FILE__ and __LINE__ to internal_error.
4966
98a5dd13
DE
49672011-05-13 Doug Evans <dje@google.com>
4968
4969 * thread-db.c (try_thread_db_load_from_sdir): New function.
4970 (try_thread_db_load_from_dir): New function.
4971 (thread_db_load_search): Handle $sdir, ignore $pdir.
4972 Remove trying of system directories if search of
4973 libthread-db-search-path fails, that is now done via $sdir.
4974
d248b706
KY
49752011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4976
4977 * server.c (handle_query): Add EnableDisableTracepoints to the list
4978 of supported features.
43aaf8b6 4979 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 4980 tracepoints.
43aaf8b6
PA
4981 (cmd_qtenable_disable): New.
4982 (cmd_qtstart): Install tracepoints even if disabled.
4983 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4984 receiving a QTEnable or QTDisable packet.
4985 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4986 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4987 tracepoints.
4988 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 4989
84e578fb
DE
49902011-05-10 Doug Evans <dje@google.com>
4991
4992 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4993
71f55dd8
DE
49942011-05-04 Doug Evans <dje@google.com>
4995
4996 * linux-low.c (linux_join): Skip process lookup.
4997 * spu-low.c (spu_join): Ditto.
4998 * server.c (join_inferiors_callback): Delete.
4999 (process_serial_event): For 'D' packet (detach) call join_inferior
5000 directly.
5001
4d393d60
JM
50022011-05-04 Joseph Myers <joseph@codesourcery.com>
5003
5004 * README: Don't mention xscale*-*-linux*.
5005 * configure.srv (xscale*-*-linux*): Don't handle target.
5006
b00ad6ff
NF
50072011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5008
5009 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5010 casting pointers.
5011 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5012 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5013 (i386_emit_void_call_2): Likewise.
5014
af96c192
YQ
50152011-04-26 Yao Qi <yao@codesourcery.com>
5016
43aaf8b6
PA
5017 * linux-low.c: Move common macros to linux-ptrace.h.
5018 Include linux-ptrace.h.
af96c192
YQ
5019 * Makefile.in (linux_ptrace_h): New.
5020 (linux-low.o): Depends on linux-ptrace.h.
5021
03f2bd59
JK
50222011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5023
5024 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5025 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5026 (remote_prepare): New function with most of the TCP code from ...
5027 (remote_open): ... here. Detect PORT here unconditionally. Move also
5028 setting transport_is_reliable.
5029 * server.c (run_once): New variable.
5030 (gdbserver_usage): Document it.
5031 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5032 the first run if RUN_ONCE.
5033 * server.h (run_once, remote_prepare): New declarations.
5034
7a9dd1b2
TT
50352011-04-19 Tom Tromey <tromey@redhat.com>
5036
5037 * win32-low.c (handle_load_dll): Remove duplicate "the".
5038
81239425
PM
50392011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5040
5041 Remove support for old Cygwin 1.5 versions.
5042 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5043 function to avoid warning.
5044 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5045 warning.
5046
9e0627f1
PM
50472011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5048
5049 * gdbserver/server.h (Macro _): Define it if not available.
5050
588eebee
MS
50512011-03-14 Michael Snyder <msnyder@vmware.com>
5052
348af9f7 5053 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5054
43f70d4c
JB
50552011-03-10 Joel Brobecker <brobecker@adacore.com>
5056
5057 * Makefile.in (maintainer-clean realclean distclean): Remove
5058 "make ... subdir_do" command.
5059
348af9f7
MS
50602011-03-10 Michael Snyder <msnyder@vmware.com>
5061
5062 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5063
5064 * server.c (handle_v_run): Free alloced buffer on early return.
5065
e637a4f5
YQ
50662011-03-09 Yao Qi <yao@codesourcery.com>
5067
5068 Revert:
5069 2011-03-04 Yao Qi <yao@codesourcery.com>
5070
5071 * Makefile.in: Remove GNU make feature --directory.
5072
5073 2011-03-05 Yao Qi <yao@codesourcery.com>
5074
5075 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5076 (subdir_do): New make target. Copied from gdb/Makefile.
5077 (maintainer-clean, realclean, distclean, clean): Call corresponding
5078 make targets in common/Makefile.
5079
5080 2011-02-11 Yao Qi <yao@codesourcery.com>
5081
5082 * configure.ac: Call AC_PROG_RANLIB.
5083 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5084 * configure: Regenerate.
5085
e6edda56
JK
50862011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5087
5088 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5089
e5141119
JB
50902011-03-06 Yao Qi <yao@codesourcery.com>
5091
5092 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5093
64794aa4
JB
50942011-03-05 Yao Qi <yao@codesourcery.com>
5095
5096 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5097 (subdir_do): New make target. Copied from gdb/Makefile.
5098 (maintainer-clean, realclean, distclean, clean): Call corresponding
5099 make targets in common/Makefile.
5100
7a762829
YQ
51012011-03-04 Yao Qi <yao@codesourcery.com>
5102
5103 * Makefile.in: Remove GNU make feature --directory.
5104
348af9f7
MS
51052011-03-04 Michael Snyder <msnyder@vmware.com>
5106
5107 * server.c (queue_stop_reply): Call xmalloc not malloc.
5108
51092011-03-02 Michael Snyder <msnyder@vmware.com>
5110
5111 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5112
9f72fee2
MS
51132011-02-28 Michael Snyder <msnyder@vmware.com>
5114
588eebee
MS
5115 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5116 (cmd_qtframe): Ditto.
5117 (cmd_qtbuffer): Ditto.
5118 (cmd_bigqtbuffer): Ditto.
5119
9f72fee2
MS
5120 * utils.c (decimal2str): Initialize 'width' to nine, then
5121 don't mess with it.
5122
8040bd49
UW
51232011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5124
5125 * hostio.c (require_data): Free *data, not data.
5126
7e52cbd0
JK
51272011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5128
5129 * hostio.c (require_data): Use free, not xfree.
5130
9130f83e
MS
51312011-02-27 Michael Snyder <msnyder@vmware.com>
5132
4b812f4e
MS
5133 * server.c (handle_query): Discard unused value.
5134
9130f83e
MS
5135 * hostio.c (require_data): Free malloc memory before returning
5136 error.
5137
69d37113
MS
51382011-02-26 Michael Snyder <msnyder@vmware.com>
5139
5140 * linux-low.c (list_threads): Call closedir for dirent.
5141
35f5825a
MS
51422011-02-27 Michael Snyder <msnyder@vmware.com>
5143
2a589cef
MS
5144 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5145 a case statement falls through.
5146
0adea5f7
MS
5147 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5148
35f5825a
MS
5149 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5150 in comparison.
5151
238f1c74
MS
51522011-02-26 Michael Snyder <msnyder@vmware.com>
5153
5154 * utils.c (decimal2str): Eliminate dead code and dead param.
5155 (pulongest): Drop dead param from call to decimal2str.
5156 (plongest): Ditto.
5157
633ff500
JB
51582011-02-24 Joel Brobecker <brobecker@adacore.com>
5159
5160 Revert the following patch (not approved yet):
5161 2011-02-21 Hui Zhu <teawater@gmail.com>
5162 * tracepoint.c (tp_printf): New function.
5163 (eval_agent_expr): Handle gdb_agent_op_printf.
5164
f9c6ff72
HZ
51652011-02-21 Hui Zhu <teawater@gmail.com>
5166
5167 * tracepoint.c (tp_printf): New function.
5168 (eval_agent_expr): Handle gdb_agent_op_printf.
5169
94d5e490
TT
51702011-02-18 Tom Tromey <tromey@redhat.com>
5171
5172 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5173 (tracepoint.o): Likewise.
5174 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5175 (gdb_agent_op_names): Likewise.
5176
c7f96d2b
TT
51772011-02-18 Tom Tromey <tromey@redhat.com>
5178
5179 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5180 gdb_agent_op_rot>: New constants.
5181 (gdb_agent_op_names): Add pick and roll.
5182 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5183 cases.
5184
0feedb2c
JK
51852011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5186
5187 * aclocal.m4: Regenerated with aclocal-1.11.1.
5188
b3b9301e
PA
51892011-02-14 Pedro Alves <pedro@codesourcery.com>
5190
5191 * server.c (handle_qxfer_traceframe_info): New.
5192 (qxfer_packets): Register "traceframe-info".
5193 (handle_query): Report support for qXfer:traceframe-info:read+.
5194 * tracepoint.c (match_blocktype): New.
5195 (traceframe_find_block_type): Rename to ...
5196 (traceframe_walk_blocks): ... this. Add callback filter argument,
5197 and use it.
5198 (traceframe_find_block_type): New, reimplemented on top of
5199 traceframe_walk_blocks.
5200 (build_traceframe_info_xml): New.
5201 (traceframe_read_info): New.
5202 * server.h (traceframe_read_info): Declare.
5203
4f3e6fb7
YQ
52042011-02-11 Yao Qi <yao@codesourcery.com>
5205
5206 * configure.ac: Call AC_PROG_RANLIB.
5207 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5208 * configure: Regenerate.
5209
764880b7
PA
52102011-02-07 Pedro Alves <pedro@codesourcery.com>
5211
5212 * server.c (gdb_read_memory): Change return semantics to allow
5213 partial transfers.
5214 (handle_search_memory_1): Adjust.
5215 (process_serial_event) <'m' packet>: Handle partial transfers.
5216 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5217
1c79eb8a
PA
52182011-01-28 Pedro Alves <pedro@codesourcery.com>
5219
5220 * regcache.c (init_register_cache): Initialize
5221 regcache->register_status.
5222 (free_register_cache): Release regcache->register_status.
5223 (regcache_cpy): Copy register_status.
5224 (registers_to_string): Print 'x's for unavailable registers.
5225 (supply_register): Mark the register's status valid or
5226 unavailable, depending on whether a buffer was passed in or not.
5227 (supply_register_zeroed): New.
5228 (supply_regblock): Mark the registers' status valid or
5229 unavailable, depending on whether a buffer was passed in or not.
5230 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5231 (struct regcache): New `register_status' field.
5232 (supply_register_zeroed): Declare.
5233 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5234 supply_register_zeroed, rather than passing a NULL buffer to
5235 supply_register.
5236 * tracepoint.c (fetch_traceframe_registers): Update comment.
5237
85724a0e
PA
52382011-01-28 Pedro Alves <pedro@codesourcery.com>
5239
5240 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5241 buffer explicit.
5242
d08aafef
PA
52432011-01-25 Pedro Alves <pedro@codesourcery.com>
5244
5245 * server.h (decode_xfer_write): Change prototype.
5246 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5247 and don't extract the annex here.
5248 * server.c (decode_xfer_read): Remove `annex' parameter,
5249 and don't extract the annex here.
5250 (decode_xfer): New.
5251 (struct qxfer): New.
5252 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5253 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5254 (handle_qxfer_statictrace): New functions, abstracted out from
5255 handle_query, and made to use the struct qxfer interface.
5256 (handle_threads_qxfer_proper): Rename to ...
5257 (handle_qxfer_threads_proper): ... this.
5258 (handle_threads_qxfer): Rename to ...
5259 (handle_qxfer_threads): ... this. Adjust.
5260 (qxfer_packets): New array.
5261 (handle_qxfer): New function.
5262 (handle_query): Use handle_qxfer.
5263
493e2a69
MS
52642011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5265
5266 * gdbreplay.c: Shorten lines of >= 80 columns.
5267 * linux-low.c: Ditto.
5268 * linux-ppc-low.c: Ditto.
5269 * linux-s390-low.c: Ditto.
5270 * linux-sparc-low.c: Ditto.
5271 * linux-x86-low.c: Ditto.
5272 * linux-xtensa-low.c: Ditto.
5273 * mem-break.c: Ditto.
5274 * nto-low.c: Ditto.
5275 * regcache.h: Ditto.
5276 * remote-utils.c: Ditto.
5277 * server.c: Ditto.
5278 * server.h: Ditto.
5279 * thread-db.c: Ditto.
5280 * tracepoint.c: Ditto.
5281 * utils.c: Ditto.
5282 * win32-low.h: Ditto.
5283
44944448
JB
52842011-01-05 Joel Brobecker <brobecker@adacore.com>
5285
5286 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5287 update.
5288
71ce852c
JB
52892011-01-01 Joel Brobecker <brobecker@adacore.com>
5290
5291 * server.c (gdbserver_version): Update copyright year in version
5292 output.
5293 * gdbreplay.c (gdbreplay_version): Ditto.
5294
eb826dc6
MF
52952010-12-29 Jie Zhang <jie.zhang@analog.com>
5296
5297 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5298 * linux-bfin-low.c: New file.
5299 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5300 PT_DATA_ADDR for BFIN targets.
5301 * Makefile.in (SFILES): Add linux-bfin-low.c.
5302 (clean): Remove reg-bfin.c.
5303 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5304 * README: Mention supported Blackfin targets.
5305
39ab222a
MF
53062010-12-23 Mike Frysinger <vapier@gentoo.org>
5307
5308 * .gitignore: New file.
5309
a1f2ce7d
MF
53102010-11-16 Mike Frysinger <vapier@gentoo.org>
5311
5312 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5313
f474844c
JZ
53142010-10-22 Jie Zhang <jie@codesourcery.com>
5315
5316 * Makefile.in: Add FLAGS_TO_PASS variable.
5317 (install): Remove dependency of install-only and recursively
5318 invoke make for install-only.
5319
f1048712
DE
53202010-10-04 Doug Evans <dje@google.com>
5321
5322 * Makefile.in (uninstall): Use $(DESTDIR).
5323
b53a1623
PA
53242010-09-24 Pedro Alves <pedro@codesourcery.com>
5325
e6ee044d
PA
5326 PR gdb/11842
5327
b53a1623
PA
5328 * linux-x86-low.c (compat_siginfo_from_siginfo)
5329 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5330 si_code is < 0. Check for si_code == SI_TIMER before checking for
5331 si_code < 0.
5332
fa1bd1e4
JB
53332010-09-13 Joel Brobecker <brobecker@adacore.com>
5334
5335 * lynx-i386-low.c: New file.
5336 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5337
47fac8f8
JB
53382010-09-13 Joel Brobecker <brobecker@adacore.com>
5339
5340 * lynx-low.c (ptrace_request_to_str): Remove handling for
5341 request values that have been removed in LynxOS 5.x.
5342
1adfc54d
JB
53432010-09-13 Joel Brobecker <brobecker@adacore.com>
5344
5345 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5346 <ptrace.h>
5347
c2a66c29
NS
53482010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5349
5350 * configure.ac: Add --enable-inprocess-agent option.
5351 * configure: Rebuilt.
5352
32fcada3
YQ
53532010-09-06 Yao Qi <yao@codesourcery.com>
5354
5355 * linux-low.c (linux_kill): Remove unused variable.
5356 (linux_stabilize_threads): Likewise.
5357 * server.c (start_inferior): Likewise.
5358 (queue_stop_reply_callback): Likewise.
5359 * tracepoint.c (do_action_at_tracepoint): Likewise.
5360
0cccb683
YQ
53612010-09-06 Yao Qi <yao@codesourcery.com>
5362
5363 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5364 on return.
5365
423ec54c
JK
53662010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5367
5368 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5369
12ac6819
PA
53702010-09-06 Pedro Alves <pedro@codesourcery.com>
5371
5372 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5373 "$(IPA_DEPFILES)".
5374
8ed54b31
JB
53752010-09-01 Joel Brobecker <brobecker@adacore.com>
5376
5377 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5378 gdbserver/lynx-ppc-low.c: New files.
5379 * Makefile.in (lynx_low_h): New variable.
5380 (lynx-low.o, lynx-ppc-low.o): New rules.
5381 * configure.ac: On LynxOS, link with -lnetinet.
5382 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5383 * configure: regenerate.
5384
bb0116a4
JB
53852010-09-01 Joel Brobecker <brobecker@adacore.com>
5386
5387 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5388 * configure.ac: Add check for vasprintf and vsnprintf.
5389 * configure, config.in: Regenerate.
5390 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5391
a778ab81 53922010-09-01 Joel Brobecker <brobecker@adacore.com>
5393
5394 * gdbreplay.c: Move include of alloca.h up, next to include of
5395 malloc.h.
5396 * server.h: Add include of malloc.h.
5397 * mem-break.c: Remove include of malloc.h.
5398 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5399
8b034a19 54002010-09-01 Joel Brobecker <brobecker@adacore.com>
5401
5402 * Makefile.in (memmem.o): Build with -Wno-error.
5403
54042010-09-01 Joel Brobecker <brobecker@adacore.com>
5405
5406 * utils.c (xsnprintf): Make non-static.
5407 * server.h: Add xsnprintf declaration.
5408 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5409 replace calls to snprintf by calls to xsnprintf throughout.
5410
54112010-09-01 Joel Brobecker <brobecker@adacore.com>
5412
5413 * configure.ac: Add configure check for alloca.
5414 * configure, config.in: Regenerate.
5415 * server.h: Include alloca.h if it exists.
5416 * gdbreplay.c: Include alloca.h if it exists.
5417
1a981360
PA
54182010-08-28 Pedro Alves <pedro@codesourcery.com>
5419
5420 * linux-low.c (__SIGRTMIN): Define if not already defined.
5421 (linux_create_inferior): Check for __ANDROID__ rather than
5422 __SIGRTMIN.
5423 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5424 are already deferred.
5425 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5426 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5427 stopped and already has a pending signal to report.
5428 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5429 a pending signal to report or is moving out of a jump pad.
5430 (linux_init_signals): Check for __ANDROID__ rather than
5431 __SIGRTMIN.
5432
b4d51a55
PA
54332010-08-28 Pedro Alves <pedro@codesourcery.com>
5434
5435 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5436 debug_threads check. Avoid a linear search when not doing debug
5437 output.
5438
ec48365d
PA
54392010-08-27 Pedro Alves <pedro@codesourcery.com>
5440
5441 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5442 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5443 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5444 (process_event): Change local fd's type to gdb_fildes_t.
5445 (create_file_handler): Adjust prototype.
5446 (delete_file_handler): Adjust prototype.
5447 (handle_file_event): Adjust prototype. Use pfildes.
5448 (create_file_event): Adjsut prototype.
5449 * remote-utils.c (remote_desc, listen_desc): Change type to
5450 gdb_fildes_t.
5451 * server.h: New gdb_fildes_t typedef.
5452 [USE_WIN32API]: Include winsock2.h.
5453 (delete_file_handler, add_file_handler): Adjust prototypes.
5454 (pfildes): Declare.
5455 * utils.c (pfildes): New.
5456
854d88f0
PA
54572010-08-27 Pedro Alves <pedro@codesourcery.com>
5458
5459 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5460 * configure: Regenerate.
5461
0146f85b
PA
54622010-08-27 Pedro Alves <pedro@codesourcery.com>
5463
5464 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5465 (linux_done_accessing_memory): ... this.
5466 (linux_target_ops): Adjust.
5467 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5468 * nto-low.c (nto_target_ops): Adjust comment.
5469 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5470 * spu-low.c (spu_target_ops): Adjust comment.
5471 * target.h (target_ops): Rename unprepare_to_access_memory field
5472 to done_accessing_memory.
5473 (unprepare_to_access_memory): Rename to ...
5474 (done_accessing_memory): ... this.
5475
90d74c30
PA
54762010-08-26 Pedro Alves <pedro@codesourcery.com>
5477
5478 * linux-low.c (linux_prepare_to_access_memory): New.
5479 (linux_unprepare_to_access_memory): New.
5480 (linux_target_ops): Install them.
5481 * server.c (read_memory): Rename to ...
5482 (gdb_read_memory): ... this. Use
5483 prepare_to_access_memory/prepare_to_access_memory.
5484 (write_memory): Rename to ...
5485 (gdb_write_memory): ... this. Use
5486 prepare_to_access_memory/prepare_to_access_memory.
5487 (handle_search_memory_1): Adjust.
5488 (process_serial_event): Adjust.
5489 * target.h (struct target_ops): New fields
5490 prepare_to_access_memory and unprepare_to_access_memory.
5491 (prepare_to_access_memory, unprepare_to_access_memory): New.
5492 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5493 prepare_to_access_memory/prepare_to_access_memory.
5494 * nto-low.c (nto_target_ops): Adjust.
5495 * spu-low.c (spu_target_ops): Adjust.
5496 * win32-low.c (win32_target_ops): Adjust.
5497
fd467969
PA
54982010-08-26 Pedro Alves <pedro@codesourcery.com>
5499
5500 * Makefile.in (WARN_CFLAGS): Get it from configure.
5501 (WERROR_CFLAGS): New.
5502 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5503 * configure.ac: Introduce --enable-werror, which adds -Werror to
5504 the compiler command line. Enabled by default. Disable with
5505 --disable-werror. Add -Wdeclaration-after-statement
5506 Wpointer-arith and -Wformat-nonliteral to warning flags.
5507 * configure: Regenerate.
5508
331e2f5f
PA
55092010-08-26 Pedro Alves <pedro@codesourcery.com>
5510
5511 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5512
e581f2b4
PA
55132010-08-26 Pedro Alves <pedro@codesourcery.com>
5514
5515 * gdbreplay.c (remote_error): New.
5516 (gdbchar): New.
5517 (expect): Use gdbchar. Check for error reading from GDB.
5518 Clarify sync error output.
5519 (play): Check for errors writing to GDB.
5520 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5521 * remote-utils.c (getpkt): Check for errors writing to the remote
5522 descriptor.
5523
3c11dd79
PA
55242010-08-25 Pedro Alves <pedro@codesourcery.com>
5525
5526 * linux-low.c (linux_wait_1): Move non-debugging code out of
5527 `debug_threads' control.
5528
d20a8ad9
PA
55292010-08-25 Pedro Alves <pedro@codesourcery.com>
5530
5531 * linux-low.c (linux_wait_1): Don't set last_status here.
5532 * server.c (push_event, queue_stop_reply_callback): Assert we're
5533 not pushing a TARGET_WAITKIND_IGNORE event.
5534 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5535 (myresume, handle_target_event): Set the thread's last_resume_kind
5536 and last_status from the target returned status.
5537
964e4306
PA
55382010-08-25 Pedro Alves <pedro@codesourcery.com>
5539
5540 PR threads/10729
5541
5542 * linux-x86-low.c (update_debug_registers_callback): New.
5543 (i386_dr_low_set_addr): Use it.
5544 (i386_dr_low_get_addr): New.
5545 (i386_dr_low_set_control): Use update_debug_registers_callback.
5546 (i386_dr_low_get_control): New.
5547 (i386_dr_low_get_status): Adjust.
5548 * linux-low.c (linux_stop_lwp): New.
5549 * linux-low.h (linux_stop_lwp): Declare.
5550
5551 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5552 argument instead of a i386_debug_reg_state.
5553 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5554 a i386_debug_reg_state.
5555 (i386_insert_aligned_watchpoint): Adjust.
5556 (i386_remove_aligned_watchpoint): Adjust.
5557 (i386_low_stopped_data_address): Read the debug registers from the
5558 inferior instead of from the mirrors.
5559 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5560 (i386_dr_low_get_addr): Declare.
5561 (i386_dr_low_get_control): Declare.
5562 (i386_dr_low_get_status): Change prototype.
5563
5564 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5565 (i386_dr_low_get_addr): New.
5566 (i386_dr_low_get_control): New.
5567 (i386_dr_low_get_status): Adjust prototype. Return
5568 dr_status_mirror.
5569 (i386_initial_stuff): Clear dr_status_mirror and
5570 dr_control_mirror.
5571 (i386_get_thread_context): Adjust.
5572 (i386_set_thread_context): Adjust.
5573 (i386_thread_added): Adjust.
5574
5f21a75b
PA
55752010-08-24 Pedro Alves <pedro@codesourcery.com>
5576
5577 * linux-low.h (linux_thread_area): Delete declaration.
5578
3e4c1235
TS
55792010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5580
5581 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5582 after its termination.
5583
1971b033
PA
55842010-08-09 Pedro Alves <pedro@codesourcery.com>
5585
5586 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5587 (gdb_wants_all_stopped): Delete.
5588 (linux_wait_1): Don't call them.
5589 * server.c (handle_v_cont): Tag all threads as want-stopped.
5590 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5591 stopped as "client-wants-stopped".
5592
310444ac
PA
55932010-07-31 Pedro Alves <pedro@codesourcery.com>
5594
5595 * Makefile.in (signals_h): New.
5596 (server_h): Depend on it.
5597 (server.o): Don't depend on $(signals_def).
5598 (signals.o): Depend on $(signals_def).
5599
a19cae16
JK
56002010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5601
5602 * Makefile.in (signals_def): New.
5603 (server_h): Append include/gdb/signals.h and signals_def.
5604 (server.o): Append signals_def.
5605
30d50328
JK
56062010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5607
5608 * server.c (handle_target_event): Use target_signal_to_host for
5609 resume_info.sig initialization.
5610 * target.h (struct thread_resume) <sig>: New comment.
5611
5c3216e2
OS
56122010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5613
c6f46ca0
OS
5614 * server.c (handle_query): strcpy() the returned string from paddress()
5615 instead of sprintf().
5c3216e2
OS
5616 * utils.c (paddress): Return phex_nz().
5617
6bd31874
JB
56182010-07-07 Joel Brobecker <brobecker@adacore.com>
5619
5620 * server.c (handle_v_cont): Call mourn_inferior if process
5621 just exited.
5622 (myresume): Likewise.
5623
0fb4aa4b
PA
56242010-07-01 Pedro Alves <pedro@codesourcery.com>
5625
5626 Static tracepoints, and integration with UST.
5627
5628 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5629 * mem-break.c (uninsert_all_breakpoints)
5630 (reinsert_all_breakpoints): New.
5631 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5632 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5633 (gdb_agent_ust_loaded, helper_thread_id)
5634 (gdb_agent_helper_thread_id): New macros.
5635 (struct ipa_sym_addresses): Add addr_ust_loaded,
5636 addr_helper_thread_id, addr_cmd_buf.
5637 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5638 (in_process_agent_loaded_ust): New.
5639 (write_e_ust_not_loaded): New.
5640 (maybe_write_ipa_ust_not_loaded): New.
5641 (struct collect_static_trace_data_action): New.
5642 (enum tracepoint_type) <static_tracepoint>: New.
5643 (struct tracepoint) <handle>: Mention static tracepoints.
5644 (struct static_tracepoint_ctx): New.
5645 (CMD_BUF_SIZE): New.
5646 (add_tracepoint_action): Handle static tracepoint actions.
5647 (unprobe_marker_at): New.
5648 (clear_installed_tracepoints): Handle static tracepoints.
5649 (cmd_qtdp): Handle static tracepoints.
5650 (probe_marker_at): New.
5651 (cmd_qtstart): Handle static tracepoints.
5652 (response_tracepoint): Handle static tracepoints.
5653 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5654 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5655 (get_context_regcache): Handle static tracepoints.
5656 (do_action_at_tracepoint): Handle static tracepoint actions.
5657 (traceframe_find_block_type): Handle static trace data blocks.
5658 (traceframe_read_sdata): New.
5659 (download_tracepoints): Download static tracepoint actions.
5660 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5661 (GDB_PROBE_NAME): New.
5662 (ust_ops): New.
5663 (GET_UST_SYM): New.
5664 (USTF): New.
5665 (dlsym_ust): New.
5666 (ust_marker_to_static_tracepoint): New.
5667 (gdb_probe): New.
5668 (collect_ust_data_at_tracepoint): New.
5669 (gdb_ust_probe): New.
5670 (UNIX_PATH_MAX, SOCK_DIR): New.
5671 (gdb_ust_connect_sync_socket): New.
5672 (resume_thread, stop_thread): New.
5673 (run_inferior_command): New.
5674 (init_named_socket): New.
5675 (gdb_ust_socket_init): New.
5676 (cstr_to_hexstr): New.
5677 (next_st): New.
5678 (first_marker, next_marker): New.
5679 (response_ust_marker): New.
5680 (cmd_qtfstm, cmd_qtsstm): New.
5681 (unprobe_marker_at, probe_marker_at): New.
5682 (cmd_qtstmat, gdb_ust_thread): New.
5683 (gdb_ust_init): New.
5684 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5685 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5686 (ST_REGENTRY): New.
5687 (x86_64_st_collect_regmap): New.
5688 (X86_64_NUM_ST_COLLECT_GREGS): New.
5689 (AMD64_RIP_REGNUM): New.
5690 (supply_static_tracepoint_registers): New.
5691 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5692 (ST_REGENTRY): New.
5693 (i386_st_collect_regmap): New.
5694 (i386_NUM_ST_COLLECT_GREGS): New.
5695 (supply_static_tracepoint_registers): New.
5696 * server.c (handle_query): Handle qXfer:statictrace:read.
5697 <qSupported>: Report support for StaticTracepoints, and
5698 qXfer:statictrace:read features.
5699 * server.h (traceframe_read_sdata)
5700 (supply_static_tracepoint_registers): Declare.
5701 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5702 (unpack_varlen_hex): Include in IPA build.
5703 * Makefile.in (ustlibs, ustinc): New.
5704 (IPA_OBJS): Add remote-utils-ipa.o.
5705 ($(IPA_LIB)): Link -ldl and -lpthread.
5706 (UST_CFLAGS): New.
5707 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5708 * config.in, configure: Regenerate.
5709
9e4344e5
PA
57102010-06-20 Ian Lance Taylor <iant@google.com>
5711 Pedro Alves <pedro@codesourcery.com>
5712
5713 * linux-x86-low.c (always_true): Delete.
5714 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5715 trying to fool the compiler with always_true.
5716
c6beb2cb
PA
57172010-06-20 Pedro Alves <pedro@codesourcery.com>
5718
5719 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5720 conditions in gdbserver.
5721
d2ed6730
UW
57222010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5723
5724 * spu-low.c (spu_read_memory): Wrap around local store limit.
5725 (spu_write_memory): Likewise.
5726
4e29fb54
PA
57272010-06-15 Pedro Alves <pedro@codesourcery.com>
5728
5729 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5730 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5731 LONGEST uses.
5732 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5733 uses.
5734 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5735 uses with LONGEST uses.
5736
6a271cae
PA
57372010-06-14 Stan Shebs <stan@codesourcery.com>
5738 Pedro Alves <pedro@codesourcery.com>
5739
5740 Bytecode compiler.
5741
5742 * linux-x86-low.c: Include limits.h.
5743 (add_insns): New.
5744 (always_true): New.
5745 (EMIT_ASM): New.
5746 (EMIT_ASM32): New.
5747 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5748 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5749 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5750 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5751 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5752 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5753 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5754 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5755 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5756 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5757 (amd64_emit_void_call_2): New.
5758 (amd64_emit_ops): New.
5759 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5760 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5761 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5762 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5763 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5764 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5765 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5766 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5767 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5768 (i386_emit_stack_adjust, i386_emit_int_call_1)
5769 (i386_emit_void_call_2): New.
5770 (i386_emit_ops): New.
5771 (x86_emit_ops): New.
5772 (the_low_target): Install x86_emit_ops.
5773 * server.h (struct emit_ops): New.
5774 (get_raw_reg_func_addr): Declare.
5775 (current_insn_ptr, emit_error): Declare.
5776 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5777 (set_trace_state_variable_value): New defines.
5778 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5779 addr_get_trace_state_variable_value and
5780 addr_set_trace_state_variable_value.
5781 (symbol_list): New fields for get_raw_reg,
5782 get_trace_state_variable_value and set_trace_state_variable_value.
5783 (condfn): New typedef.
5784 (struct tracepoint): New field `compiled_cond'.
5785 (do_action_at_tracepoint): Clear compiled_cond.
5786 (get_trace_state_variable_value, set_trace_state_variable_value):
5787 Export in the IPA.
5788 (condition_true_at_tracepoint): If there's a compiled condition,
5789 run that.
5790 (current_insn_ptr, emit_error): New globals.
5791 (struct bytecode_address): New.
5792 (get_raw_reg_func_addr): New.
5793 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5794 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5795 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5796 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5797 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5798 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5799 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5800 (compile_tracepoint_condition, compile_bytecodes): New.
5801 * target.h (emit_ops): Forward declare.
5802 (struct target_ops): New field emit_ops.
5803 (target_emit_ops): New.
5804 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5805 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5806 * linux-low.c (linux_emit_ops): New.
5807 (linux_target_ops): Install it.
5808 * linux-low.h (struct linux_target_ops): New field emit_ops.
5809
92b72907
UW
58102010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5811
5812 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5813 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5814
fa593d66
PA
58152010-06-01 Pedro Alves <pedro@codesourcery.com>
5816 Stan Shebs <stan@codesourcery.com>
5817
5818 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5819 (all): Depend on $(extra_libraries).
5820 (install-only): Install the IPA.
5821 (IPA_OBJS, IPA_LIB): New.
5822 (clean): Remove the IPA lib.
5823 (IPAGENT_CFLAGS): New.
5824 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5825 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5826 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5827 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5828 * configure.ac: Check for atomic builtins support in the compiler.
5829 (IPA_DEPFILES, extra_libraries): Define.
5830 * configure.srv (ipa_obj): Add description.
5831 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5832 (i[34567]86-*-linux*): Set ipa_obj.
5833 (x86_64-*-linux*): Set ipa_obj.
5834 * linux-low.c (stabilizing_threads): New.
5835 (supports_fast_tracepoints): New.
5836 (linux_detach): Stabilize threads before detaching.
5837 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5838 the lwp is either not stabilizing, or is moving out of a jump pad.
5839 (linux_fast_tracepoint_collecting): New.
5840 (maybe_move_out_of_jump_pad): New.
5841 (enqueue_one_deferred_signal): New.
5842 (dequeue_one_deferred_signal): New.
5843 (linux_wait_for_event_1): If moving out of a jump pad, defer
5844 pending signals to later.
5845 (linux_stabilize_threads): New.
5846 (linux_wait_1): Check if threads need moving out of jump pads, and
5847 do it if so.
5848 (stuck_in_jump_pad_callback): New.
5849 (move_out_of_jump_pad_callback): New.
5850 (lwp_running): New.
5851 (linux_resume_one_lwp): Handle moving out of jump pads.
5852 (linux_set_resume_request): Dequeue deferred signals.
5853 (need_step_over_p): Also step over fast tracepoint jumps.
5854 (start_step_over): Also uninsert fast tracepoint jumps.
5855 (finish_step_over): Also reinsert fast tracepoint jumps.
5856 (linux_install_fast_tracepoint_jump): New.
5857 (linux_target_ops): Install linux_stabilize_threads and
5858 linux_install_fast_tracepoint_jump_pad.
5859 * linux-low.h (linux_target_ops) <get_thread_area,
5860 install_fast_tracepoint_jump_pad>: New fields.
5861 (struct lwp_info) <collecting_fast_tracepoint,
5862 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5863 (linux_get_thread_area): Declare.
5864 * linux-x86-low.c (jump_insn): New.
5865 (x86_get_thread_area): New.
5866 (append_insns): New.
5867 (push_opcode): New.
5868 (amd64_install_fast_tracepoint_jump_pad): New.
5869 (i386_install_fast_tracepoint_jump_pad): New.
5870 (x86_install_fast_tracepoint_jump_pad): New.
5871 (the_low_target): Install x86_get_thread_area and
5872 x86_install_fast_tracepoint_jump_pad.
5873 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5874 (struct fast_tracepoint_jump): New.
5875 (fast_tracepoint_jump_insn): New.
5876 (fast_tracepoint_jump_shadow): New.
5877 (find_fast_tracepoint_jump_at): New.
5878 (fast_tracepoint_jump_here): New.
5879 (delete_fast_tracepoint_jump): New.
5880 (set_fast_tracepoint_jump): New.
5881 (uninsert_fast_tracepoint_jumps_at): New.
5882 (reinsert_fast_tracepoint_jumps_at): New.
5883 (set_breakpoint_at): Use write_inferior_memory.
5884 (uninsert_raw_breakpoint): Use write_inferior_memory.
5885 (check_mem_read): Mask out fast tracepoint jumps.
5886 (check_mem_write): Mask out fast tracepoint jumps.
5887 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5888 (set_fast_tracepoint_jump): Declare.
5889 (delete_fast_tracepoint_jump)
5890 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5891 (reinsert_fast_tracepoint_jumps_at): Declare.
5892 * regcache.c: Don't compile many functions when building the
5893 in-process agent library.
5894 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5895 the register buffer in the heap.
5896 (free_register_cache): If the register buffer isn't owned by the
5897 regcache, don't free it.
5898 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5899 pre-existing register caches.
5900 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5901 type.
5902 (convert_ascii_to_int): : Constify `from' parameter type.
5903 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5904 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5905 the needed buffer in-place.
5906 (relocate_instruction): New.
5907 * server.c (handle_query) <qSymbols>: If the target supports
5908 tracepoints, give it a chance of looking up symbols. Report
5909 support for fast tracepoints.
5910 (handle_status): Stabilize threads.
5911 (process_serial_event): Adjust.
5912 * server.h (struct fast_tracepoint_jump): Forward declare.
5913 (struct process_info) <fast_tracepoint_jumps>: New field.
5914 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5915 (decode_X_packet, decode_M_packet): Adjust.
5916 (relocate_instruction): Declare.
5917 (in_process_agent_loaded): Declare.
5918 (tracepoint_look_up_symbols): Declare.
5919 (struct fast_tpoint_collect_status): Declare.
5920 (fast_tracepoint_collecting): Declare.
5921 (force_unlock_trace_buffer): Declare.
5922 (handle_tracepoint_bkpts): Declare.
5923 (initialize_low_tracepoint)
5924 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5925 * target.h (struct target_ops) <stabilize_threads,
5926 install_fast_tracepoint_jump_pad>: New fields.
5927 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5928 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5929 [HAVE_STDINT_H]: Include stdint.h.
5930 (trace_debug_1): Rename to ...
5931 (trace_vdebug): ... this.
5932 (trace_debug): Rename to ...
5933 (trace_debug_1): ... this. Add `level' parameter.
5934 (trace_debug): New.
5935 (ATTR_USED, ATTR_NOINLINE): New.
5936 (IP_AGENT_EXPORT): New.
5937 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5938 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5939 (about_to_request_buffer_space, trace_buffer_is_full)
5940 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5941 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5942 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5943 (traceframe_write_count, traceframes_created)
5944 (trace_state_variables)
5945 New renaming defines.
5946 (struct ipa_sym_addresses): New.
5947 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5948 (symbol_list): New.
5949 (ipa_sym_addrs): New.
5950 (all_tracepoint_symbols_looked_up): New.
5951 (in_process_agent_loaded): New.
5952 (write_e_ipa_not_loaded): New.
5953 (maybe_write_ipa_not_loaded): New.
5954 (tracepoint_look_up_symbols): New.
5955 (debug_threads) [IN_PROCESS_AGENT]: New.
5956 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5957 (UNKNOWN_SIDE_EFFECTS): New.
5958 (stop_tracing): New.
5959 (flush_trace_buffer): New.
5960 (stop_tracing_bkpt): New.
5961 (flush_trace_buffer_bkpt): New.
5962 (read_inferior_integer): New.
5963 (read_inferior_uinteger): New.
5964 (read_inferior_data_pointer): New.
5965 (write_inferior_data_pointer): New.
5966 (write_inferior_integer): New.
5967 (write_inferior_uinteger): New.
5968 (struct collect_static_trace_data_action): Delete.
5969 (enum tracepoint_type): New.
5970 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
5971 <actions_str, step_actions, step_actions_str>: Only include in
5972 GDBserver.
fa593d66
PA
5973 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5974 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5975 (tracepoints): Use IP_AGENT_EXPORT.
5976 (last_tracepoint): Don't include in the IPA.
5977 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5978 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5979 (alloced_trace_state_variables): New.
5980 (trace_state_variables): Use IP_AGENT_EXPORT.
5981 (traceframe_t): Delete unused variable.
5982 (circular_trace_buffer): Don't include in the IPA.
5983 (trace_buffer_start): Delete.
5984 (struct trace_buffer_control): New.
5985 (trace_buffer_free): Delete.
5986 (struct ipa_trace_buffer_control): New.
5987 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5988 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5989 New.
5990 (trace_buffer_ctrl): New.
5991 (TRACE_BUFFER_CTRL_CURR): New.
5992 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5993 Reimplement as macros.
5994 (trace_buffer_wrap): Delete.
5995 (traceframe_write_count, traceframe_read_count)
5996 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5997 (struct tracepoint_hit_ctx) <type>: New field.
5998 (struct fast_tracepoint_ctx): New.
5999 (memory_barrier): New.
6000 (cmpxchg): New.
6001 (record_tracepoint_error): Update atomically in the IPA.
6002 (clear_inferior_trace_buffer): New.
6003 (about_to_request_buffer_space): New.
6004 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6005 updating the same buffer.
6006 (add_tracepoint): Default the tracepoint's type to trap
6007 tracepoint, and orig_size to -1.
6008 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6009 internal variables.
6010 (create_trace_state_variable): New parameter `gdb'. Handle it.
6011 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6012 (cmd_qtdp): Handle fast tracepoints.
6013 (cmd_qtdv): Adjust.
6014 (max_jump_pad_size): New.
6015 (gdb_jump_pad_head): New.
6016 (get_jump_space_head): New.
6017 (claim_jump_space): New.
6018 (sort_tracepoints): New.
6019 (MAX_JUMP_SIZE): New.
6020 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6021 IPA.
6022 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6023 support. Upload fast traceframes, and delete internal IPA
6024 breakpoints.
6025 (stop_tracing_handler): New.
6026 (flush_trace_buffer_handler): New.
6027 (cmd_qtstop): Upload fast tracepoints.
6028 (response_tracepoint): Handle fast tracepoints.
6029 (tracepoint_finished_step): Upload fast traceframes. Set the
6030 tracepoint hit context's tracepoint type.
6031 (handle_tracepoint_bkpts): New.
6032 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6033 type. Add comment about fast tracepoints.
6034 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6035 non-existing action_str field.
6036 (get_context_regcache): Handle fast tracepoints.
6037 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6038 to the regcache.
6039 (fast_tracepoint_from_jump_pad_address): New.
6040 (fast_tracepoint_from_ipa_tpoint_address): New.
6041 (collecting_t): New.
6042 (force_unlock_trace_buffer): New.
6043 (fast_tracepoint_collecting): New.
6044 (collecting): New.
6045 (gdb_collect): New.
6046 (write_inferior_data_ptr): New.
6047 (target_tp_heap): New.
6048 (target_malloc): New.
6049 (download_agent_expr): New.
6050 (UALIGN): New.
6051 (download_tracepoints): New.
6052 (download_trace_state_variables): New.
6053 (upload_fast_traceframes): New.
6054 (IPA_FIRST_TRACEFRAME): New.
6055 (IPA_NEXT_TRACEFRAME_1): New.
6056 (IPA_NEXT_TRACEFRAME): New.
6057 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6058 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6059 (gdb_jump_pad_buffer_end): New.
6060 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6061 (initialize_tracepoint): Adjust.
6062 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6063 buffer. Initialize the low module.
6064 * utils.c (PREFIX, TOOLNAME): New.
6065 (malloc_failure): Use PREFIX.
6066 (error): In the IPA, an error causes an exit.
6067 (fatal, warning): Use PREFIX.
6068 (internal_error): Use TOOLNAME.
6069 (NUMCELLS): Increase to 10.
6070 * configure, config.in: Regenerate.
6071
d149dd1d
PA
60722010-06-01 Pedro Alves <pedro@codesourcery.com>
6073
6074 * server.c (handle_query) <qSupported>: Do two passes over the
6075 qSupported string to avoid nesting strtok.
6076
f6528abd
JK
60772010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6078
6079 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6080 (CDEPS): New.
6081 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6082 -Wl,--dynamic-list.
6083 * configure: Regenerate.
6084 * proc-service.list: New.
6085
ca2a87a0
JK
60862010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6087
6088 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6089 New comment.
6090
363a6e9f
OS
60912010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6092
6093 * gdbreplay.c (remote_open): Check error return from socket() call by
6094 its equality to -1 not by it being negative.
6095 * remote-utils.c (remote_open): Likewise.
6096
d23b6cb1
PA
60972010-05-23 Pedro Alves <pedro@codesourcery.com>
6098
6099 * config.h: Regenerate.
6100
28d3cf85
MK
61012010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6102
6103 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6104 doesn't provide PTRACE_GET_THREAD_AREA.
6105
fea36a59
MK
61062010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6107
6108 * linux-m68k-low.c: Include <asm/ptrace.h>
6109 (ps_get_thread_area): Implement.
6110
24b066ba
DE
61112010-05-03 Doug Evans <dje@google.com>
6112
6113 * event-loop.c (struct callback_event): New struct.
6114 (callback_list): New global.
6115 (append_callback_event, delete_callback_event): New functions.
6116 (process_callback): New function.
6117 (start_event_loop): Call it.
6118 * remote-utils.c (NOT_SCHEDULED): Define.
6119 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6120 moved out of readchar.
6121 (readchar): Rewrite. Call reschedule before returning.
6122 (reset_readchar): New function.
6123 (remote_close): Call it.
6124 (process_remaining, reschedule): New functions.
6125 * server.h (callback_handler_func): New typedef.
6126 (append_callback_event, delete_callback_event): Declare.
6127
9836d6ea
PA
61282010-05-03 Pedro Alves <pedro@codesourcery.com>
6129
6130 * proc-service.c (ps_pglobal_lookup): Use
6131 thread_db_look_up_one_symbol.
6132 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6133 parameter. Use it instead of all_symbols_looked_up.
6134 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6135 field.
6136 (all_symbols_looked_up): Don't declare.
6137 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6138 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6139 field.
6140 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6141 Set all_symbols_looked_up here.
6142 (thread_db_look_up_one_symbol): New.
6143 (thread_db_get_tls_address): Adjust.
6144 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6145 thread_db object on the heap, and tentatively set it in the
6146 process structure.
6147 (thread_db_init): Don't set all_symbols_looked_up here.
6148 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6149
7984d532
PA
61502010-05-03 Pedro Alves <pedro@codesourcery.com>
6151
6152 * linux-low.c (linux_kill, linux_detach): Adjust.
6153 (status_pending_p_callback): Remove redundant statement. Check
6154 for !TARGET_WAITIKIND_IGNORE, instead of
6155 TARGET_WAITKIND_STOPPED.
6156 (handle_tracepoints): Make sure LWP is locked. Adjust.
6157 (linux_wait_for_event_1): Adjust.
6158 (linux_cancel_breakpoints): New.
6159 (unsuspend_one_lwp): New.
6160 (unsuspend_all_lwps): New.
6161 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6162 (send_sigstop_callback): Change return type to int, add new
6163 `except' parameter and handle it.
6164 (suspend_and_send_sigstop_callback): New.
6165 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6166 pass them down. If SUSPEND, also increment the lwp's suspend
6167 count.
6168 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6169 (need_step_over_p): Don't consider suspended LWPs.
6170 (start_step_over): Adjust.
6171 (proceed_one_lwp): Change return type to int, add new `except'
6172 parameter and handle it.
6173 (unsuspend_and_proceed_one_lwp): New.
6174 (proceed_all_lwps): Use find_inferior instead of
6175 for_each_inferior.
6176 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6177 also decrement the suspend count of LWPs. Pass `except' down,
6178 instead of hacking its suspend count.
6179 (linux_pause_all): Add `freeze' parameter. Adjust.
6180 (linux_unpause_all): New.
6181 (linux_target_ops): Install linux_unpause_all.
6182 * server.c (handle_status): Adjust.
6183 * target.h (struct target_ops): New fields `unpause_all' and
6184 `cancel_breakpoints'. Add new parameter to `pause_all'.
6185 (pause_all): Add new `freeze' parameter.
6186 (unpause_all): New.
6187 (cancel_breakpoints): New.
6188 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6189 cancel breakpoints.
6190 (cmd_qtstart): Pause threads.
6191 (stop_tracing): Pause threads, and cancel breakpoints.
6192 * win32-low.c (win32_target_ops): Adjust.
6193
e471f25b
PA
61942010-05-03 Pedro Alves <pedro@codesourcery.com>
6195
6196 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6197 the inferior right away from here...
6198 (linux_wait_1): ... to here, and adjust to check the thread's
6199 last_resume_kind instead of the lwp's step or stop_expected flags.
6200
1915ef4f
PA
62012010-05-02 Pedro Alves <pedro@codesourcery.com>
6202
6203 * README: Use consistent `GDB' and `GDBserver' spellings.
6204
f9e39928
PA
62052010-05-02 Pedro Alves <pedro@codesourcery.com>
6206
6207 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6208 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6209 (linux_detach_one_lwp): Assume the lwp is stopped.
6210 (any_thread_of): Delete.
6211 (linux_detach): Stop all lwps here. Don't blindly delete all
6212 breakpoints.
6213 (delete_lwp_callback): New.
6214 (linux_mourn): Delete all lwps of the process that is gone.
6215 (linux_wait_1): Don't delete the last lwp of the process here.
6216 * mem-break.h (mark_breakpoints_out): Declare.
6217 * mem-break.c (mark_breakpoints_out): New.
6218 (free_all_breakpoints): Use it.
6219 * server.c (handle_target_event): If the process is gone, mark
6220 breakpoints out.
6221 * thread-db.c (struct thread_db) <create_bp>: New field.
6222 (thread_db_enable_reporting): Fix prototype. Store a thread event
6223 breakpoint reference in the thread_db struct.
6224 (thread_db_load_search): Clear the thread_db object.
6225 (try_thread_db_load_1): Ditto.
6226 (switch_to_process): New.
6227 (disable_thread_event_reporting): Use it.
6228 (remove_thread_event_breakpoints): New.
6229 (thread_db_detach, thread_db_mourn): Use it.
6230
1e7fc18c
PA
62312010-05-01 Pedro Alves <pedro@codesourcery.com>
6232
6233 * linux-low.c (linux_enable_event_reporting): New.
6234 (linux_wait_for_event_1, handle_extended_wait): Use it.
6235
02fc4de7
PA
62362010-04-30 Pedro Alves <pedro@codesourcery.com>
6237
6238 * linux-low.c (linux_kill_one_lwp, linux_kill)
6239 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6240 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6241 SIGSTOP even if the LWP is stopped.
6242 (send_sigstop_callback): New.
6243 (stop_all_lwps): Use send_sigstop_callback instead.
6244 (linux_resume_one_thread): Adjust.
6245 (proceed_one_lwp): Still proceed an LWP that the client has
6246 requested to stop, if we haven't reported it as stopped yet. Make
6247 sure that LWPs the client want stopped, have a pending SIGSTOP.
6248
bc3b5632
DE
62492010-04-26 Doug Evans <dje@google.com>
6250
ae1ada35
DE
6251 * server.c (handle_general_set): Make static.
6252
bc3b5632
DE
6253 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6254 Print received char after testing for error/eof instead of before.
6255 (input_interrupt): Tweak comment.
6256
65730243
DE
62572010-04-23 Doug Evans <dje@google.com>
6258
6259 * server.c (start_inferior): Print inferior argv if --debug.
6260
a8ae7dc0
AR
62612010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6262
6263 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6264 * nto-x86-low.c: Include server.h
6265
1c07cc19
PM
62662010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6267
6268 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6269 be consistent with other sources of this directory.
6270 (init_registers_amd64): Correct name of source file of this function
6271 in the comment.
6272
e0a61e09
PM
62732010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6274
6275 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6276 64-bit executables.
6277
54709339
PM
62782010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6279
6280 * win32-i386-low.c: Add 64-bit support.
6281 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6282 (init_registers_amd64): Declare.
6283 (mappings): Add 64-bit version of array.
6284 (init_windows_x86): New function.
6285 (the_low_target): Change init_arch field to init_windows_x86.
6286
e8f0053d
PM
62872010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6288
6289 * win32-low.c: Adapt to support also 64-bit architecture.
6290 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6291 (get_image_name): Use SIZE_T type for local variable `done'.
6292 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6293 (toolhelp_get_dll_name): Idem.
6294 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6295 Use uintptr_t typecast to avoid warning.
6296 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6297 (handle_exception): Use phex_nz to avoid warning.
6298 (win32_wait): Remove unused local variable `process'.
6299
c481e77e
PM
63002010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6301
6302 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6303 `amd64-avx.o'.
6304
12ea4b69
PM
63052010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6306
6307 * configure.ac: Use `ws2_32' library for srv_mingw.
6308 * configure: Regenerate.
6309 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6310 * remote-utils.c: Likewise.
6311
f6d1620c
L
63122010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6313
6314 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6315 if __x86_64__ is defined.
6316
8e642873
PM
63172010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6318
6319 * configure: Regenerate.
6320
711e434b
PM
63212010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6322
6323 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6324 * target.h (target_ops): New get_tib_address field.
6325 * win32-low.h (win32_thread_info): Add thread_local_base field.
6326 * win32-low.c (child_add_thread): Add tlb argument.
6327 Set thread_local_base field to TLB.
6328 (get_child_debug_event): Adapt to child_add_thread change.
6329 (win32_get_tib_address): New function.
6330 (win32_target_ops): Set get_tib_address field to
6331 win32_get_tib_address.
6332 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6333
505106cd
PA
63342010-04-12 Pedro Alves <pedro@codesourcery.com>
6335
505106cd
PA
6336 * linux-low.c (linux_mourn): Also remove the process.
6337 * server.c (handle_target_event): Don't remove the process here.
6338 * nto-low.c (nto_mourn): New.
6339 (nto_target_ops): Install it.
6340 * spu-low.c (spu_mourn): New.
6341 (spu_target_ops): Install it.
6342 * win32-low.c (win32_mourn): New.
6343 (win32_target_ops): Install it.
6344
e8470a06
PA
63452010-04-12 Pedro Alves <pedro@codesourcery.com>
6346
6347 * server.h (buffer_xml_printf): Remove redundant `;'.
6348
45ba0d02
PA
63492010-04-12 Pedro Alves <pedro@codesourcery.com>
6350
6351 * regcache.c (set_register_cache): Invalidate regcaches before
6352 changing the register cache layout.
6353 (regcache_invalidate_one): Allow a NULL regcache.
6354 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6355 regcaches before changing the register cache layout or the target
6356 regsets.
6357
59e04013
L
63582010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6359
6360 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6361 variable warning on Linux/x86-64.
6362
8336d594
PA
63632010-04-11 Pedro Alves <pedro@codesourcery.com>
6364
6365 GDBserver disconnected tracing support.
6366
6367 * linux-low.c (linux_remove_process): Delete.
6368 (add_lwp): Don't set last_resume_kind here.
6369 (linux_kill): Use `mourn'.
6370 (linux_detach): Use `thread_db_detach', and `mourn'.
6371 (linux_mourn): New.
6372 (linux_attach_lwp_1): Adjust comment.
6373 (linux_attach): last_resume_kind moved the thread_info; adjust.
6374 (status_pending_p_callback): Adjust.
6375 (linux_wait_for_event_1): Adjust.
6376 (count_events_callback, select_singlestep_lwp_callback)
6377 (select_event_lwp_callback, cancel_breakpoints_callback)
6378 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6379 (proceed_one_lwp): Adjust.
6380 (linux_async): Add debug output.
6381 (linux_thread_stopped): New.
6382 (linux_pause_all): New.
6383 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6384 linux_pause_all.
6385 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6386 (thread_db_free): Delete declaration.
6387 (thread_db_detach, thread_db_mourn): Declare.
6388 * thread-db.c (thread_db_init): Use thread_db_mourn.
6389 (thread_db_free): Delete, split in two.
6390 (disable_thread_event_reporting): New.
6391 (thread_db_detach): New.
6392 (thread_db_mourn): New.
6393
6394 * server.h (struct thread_info) <last_resume_kind>: New field.
6395 <attached>: Add comment.
6396 <gdb_detached>: New field.
6397 (handler_func): Change return type to int.
6398 (handle_serial_event, handle_target_event): Ditto.
6399 (gdb_connected): Declare.
6400 (tracing): Delete.
6401 (disconnected_tracing): Declare.
6402 (stop_tracing): Declare.
6403
6404 * server.c (handle_query) <qSupported>: Report support for
6405 disconnected tracing.
6406 (queue_stop_reply_callback): Account for running threads.
6407 (gdb_wants_thread_stopped): New.
6408 (gdb_wants_all_threads_stopped): New.
6409 (gdb_reattached_process): New.
6410 (handle_status): Clear the `gdb_detached' flag of all processes.
6411 In all-stop, stop all threads.
6412 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6413 (process_serial_event): If the remote connection breaks, or if an
6414 exit was forced with "monitor exit", force an event loop exit.
6415 Handle disconnected tracing on detach.
6416 (handle_serial_event): Adjust.
6417 (handle_target_event): If GDB isn't connected, forward events back
6418 to the inferior, unless the last process exited, in which case,
6419 exit gdbserver. Adjust interface.
6420
6421 * remote-utils.c (remote_open): Don't block in accept. Instead
6422 register an event loop source on the listen socket file
6423 descriptor. Refactor bits into ...
6424 (listen_desc): ... this new global.
6425 (gdb_connected): ... this new function.
6426 (enable_async_notification): ... this new function.
6427 (handle_accept_event): ... this new function.
6428 (remote_close): Clear remote_desc.
6429
6430 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6431
6432 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6433 New fields.
6434 (mourn_inferior): Define.
6435 (target_process_qsupported): Avoid the dangling else problem.
6436 (thread_stopped): Define.
6437 (pause_all): Define.
6438 (target_waitstatus_to_string): Declare.
6439 * target.c (target_waitstatus_to_string): New.
6440
6441 * tracepoint.c (tracing): Make extern.
6442 (disconnected_tracing): New.
6443 (stop_tracing): Make extern. Handle tracing stops due to GDB
6444 disconnecting.
6445 (cmd_qtdisconnected): New.
6446 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6447 (handle_tracepoint_general_set): Handle QTDisconnected.
6448
6449 * event-loop.c (event_handler_func): Change return type to int.
6450 (process_event): Bail out if the event handler wants the event
6451 loop to stop.
6452 (handle_file_event): Ditto.
6453 (start_event_loop): Bail out if the event handler wants the event
6454 loop to stop.
6455
6456 * nto-low.c (nto_target_ops): Adjust.
6457 * spu-low.c (spu_wait): Don't remove the process here.
6458 (spu_target_ops): Adjust.
6459 * win32-low.c (win32_wait): Don't remove the process here.
6460 (win32_target_ops): Adjust.
6461
5d267c4c
PA
64622010-04-11 Pedro Alves <pedro@codesourcery.com>
6463
6464 * regcache.c (realloc_register_cache): Invalidate inferior's
6465 regcache before recreating it.
6466
623ccd72
PA
64672010-04-09 Pedro Alves <pedro@codesourcery.com>
6468
6469 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6470
219f2f23
PA
64712010-04-09 Stan Shebs <stan@codesourcery.com>
6472 Pedro Alves <pedro@codesourcery.com>
6473
6474 * server.h (LONGEST): New.
6475 (struct thread_info) <while_stepping>: New field.
6476 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6477 Declare.
6478 (initialize_tracepoint, handle_tracepoint_general_set)
6479 (handle_tracepoint_query, tracepoint_finished_step)
6480 (tracepoint_was_hit, release_while_stepping_state_list):
6481 (current_traceframe): Declare.
6482 * server.c (handle_general_set): Handle tracepoint packets.
6483 (read_memory): New.
6484 (write_memory): New.
6485 (handle_search_memory_1): Use read_memory.
6486 (handle_query): Report support for conditional tracepoints, trace
6487 state variables, and tracepoint sources. Handle tracepoint
6488 queries.
6489 (main): Initialize the tracepoints module.
6490 (process_serial_event): Handle traceframe reads/writes.
6491
6492 * linux-low.c (handle_tracepoints): New.
6493 (linux_wait_1): Call it.
6494 (linux_resume_one_lwp): Handle while-stepping.
6495 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6496 (linux_target_ops): Install them.
6497 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6498 New field.
6499 * linux-x86-low.c (x86_supports_tracepoints): New.
6500 (the_low_target). Install it.
6501
6502 * mem-break.h (delete_breakpoint): Declare.
6503 * mem-break.c (delete_breakpoint): Make external.
6504
6505 * target.h (struct target_ops): Add `supports_tracepoints',
6506 `read_pc', and `write_pc' fields.
6507 (target_supports_tracepoints): Define.
6508 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6509 (phex_nz): New.
6510
6511 * regcache.h (struct regcache) <registers_owned>: New field.
6512 (init_register_cache, regcache_cpy): Declare.
6513 (regcache_read_pc, regcache_write_pc): Declare.
6514 (register_cache_size): Declare.
6515 (supply_regblock): Declare.
6516 * regcache.c (init_register_cache): New.
6517 (new_register_cache): Use it.
6518 (regcache_cpy): New.
6519 (register_cache_size): New.
6520 (supply_regblock): New.
6521 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6522
219f2f23
PA
6523 * tracepoint.c: New.
6524
6525 * Makefile.in (OBS): Add tracepoint.o.
6526 (tracepoint.o): New rule.
6527
3a13a53b
L
65282010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6529
6530 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6531 (i386-mmx.o): New.
6532 (i386-mmx.c): Likewise.
6533 (i386-mmx-linux.o): Likewise.
6534 (i386-mmx-linux.c): Likewise.
6535
6536 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6537 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6538 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6539 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6540
6541 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6542 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6543 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6544
1570b33e
L
65452010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6546
6547 * Makefile.in (clean): Updated.
6548 (i386-avx.o): New.
6549 (i386-avx.c): Likewise.
6550 (i386-avx-linux.o): Likewise.
6551 (i386-avx-linux.c): Likewise.
6552 (amd64-avx.o): Likewise.
6553 (amd64-avx.c): Likewise.
6554 (amd64-avx-linux.o): Likewise.
6555 (amd64-avx-linux.c): Likewise.
6556
6557 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6558 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6559 (srv_amd64_regobj): Add amd64-avx.o.
6560 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6561 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6562 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6563 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6564 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6565 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6566 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6567
6568 * i387-fp.c: Include "i386-xstate.h".
6569 (i387_xsave): New.
6570 (i387_cache_to_xsave): Likewise.
6571 (i387_xsave_to_cache): Likewise.
6572 (x86_xcr0): Likewise.
6573
6574 * i387-fp.h (i387_cache_to_xsave): Likewise.
6575 (i387_xsave_to_cache): Likewise.
6576 (x86_xcr0): Likewise.
6577
6578 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6579 * linux-crisv32-low.c (target_regsets): Likewise.
6580 * linux-m68k-low.c (target_regsets): Likewise.
6581 * linux-mips-low.c (target_regsets): Likewise.
6582 * linux-ppc-low.c (target_regsets): Likewise.
6583 * linux-s390-low.c (target_regsets): Likewise.
6584 * linux-sh-low.c (target_regsets): Likewise.
6585 * linux-sparc-low.c (target_regsets): Likewise.
6586 * linux-xtensa-low.c (target_regsets): Likewise.
6587
6588 * linux-low.c: Include <sys/uio.h>.
6589 (regsets_fetch_inferior_registers): Support nt_type.
6590 (regsets_store_inferior_registers): Likewise.
6591 (linux_process_qsupported): New.
6592 (linux_target_ops): Add linux_process_qsupported.
6593
6594 * linux-low.h (regset_info): Add nt_type.
6595 (linux_target_ops): Add process_qsupported.
6596
6597 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6598 and <sys/uio.h>.
6599 (init_registers_i386_avx_linux): New.
6600 (init_registers_amd64_avx_linux): Likewise.
6601 (xmltarget_i386_linux_no_xml): Likewise.
6602 (xmltarget_amd64_linux_no_xml): Likewise.
6603 (PTRACE_GETREGSET): Likewise.
6604 (PTRACE_SETREGSET): Likewise.
6605 (x86_fill_xstateregset): Likewise.
6606 (x86_store_xstateregset): Likewise.
6607 (use_xml): Likewise.
6608 (x86_linux_update_xmltarget): Likewise.
6609 (x86_linux_process_qsupported): Likewise.
6610 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6611 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6612 init_registers_i386_linux here. Call
6613 x86_linux_update_xmltarget.
6614 (the_low_target): Add x86_linux_process_qsupported.
6615
6616 * server.c (handle_query): Call target_process_qsupported.
6617
6618 * target.h (target_ops): Add process_qsupported.
6619 (target_process_qsupported): New.
6620
fc7238bb
PA
66212010-04-03 Pedro Alves <pedro@codesourcery.com>
6622
6623 * inferiors.c (add_thread): Set last_status kind to
6624 TARGET_WAITKIND_IGNORE.
6625 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6626 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6627 (linux_wait_1): Move `thread' local definition to block that uses
6628 it. Don't NULL initialize `event_child'.
6629 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6630 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6631 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6632
bdabb078
PA
66332010-04-01 Pedro Alves <pedro@codesourcery.com>
6634
6635 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6636 an extended waitstatus, or by a watchpoint.
6637 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6638 thread was stepping or has been stopped by a watchpoint.
6639
d3bbe7a0
PA
66402010-04-01 Pedro Alves <pedro@codesourcery.com>
6641
6642 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6643 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6644 of another, then delete the previous, and validate all
6645 breakpoints.
6646 (validate_inserted_breakpoint): New.
6647 (delete_disabled_breakpoints): New.
6648 (validate_breakpoints): New.
6649 (check_mem_read): Validate breakpoints before trusting their
6650 shadow. Delete disabled breakpoints.
6651 (check_mem_write): Validate breakpoints before trusting they
6652 should be inserted. Delete disabled breakpoints.
6653 * mem-break.h (validate_breakpoints):
6654 * server.c (handle_query): Validate breakpoints when we see a
6655 qSymbol query.
6656
8b07ae33
PA
66572010-04-01 Pedro Alves <pedro@codesourcery.com>
6658
6659 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6660 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6661 if we could tell there's a GDB breakpoint at stop_pc.
6662 (need_step_over_p): Don't do a step over if we find a GDB
6663 breakpoint at the resume PC.
6664
6665 * mem-break.c (struct raw_breakpoint): New.
6666 (enum bkpt_type): New type `gdb_breakpoint'.
6667 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6668 fields. New field `raw'.
6669 (find_raw_breakpoint_at): New.
6670 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6671 breakpoint instead.
6672 (set_breakpoint_at): Adjust.
6673 (delete_raw_breakpoint): New.
6674 (release_breakpoint): New.
6675 (delete_breakpoint): Rename to...
6676 (delete_breakpoint_1): ... this. Add proc parameter. Use
6677 release_breakpoint. Return ENOENT.
6678 (delete_breakpoint): Reimplement.
6679 (find_breakpoint_at): Delete.
6680 (find_gdb_breakpoint_at): New.
6681 (delete_breakpoint_at): Delete.
6682 (set_gdb_breakpoint_at): New.
6683 (delete_gdb_breakpoint_at): New.
6684 (gdb_breakpoint_here): New.
6685 (set_reinsert_breakpoint): Use release_breakpoint.
6686 (uninsert_breakpoint): Rename to ...
6687 (uninsert_raw_breakpoint): ... this.
6688 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6689 (reinsert_raw_breakpoint): Change parameter type to
6690 raw_breakpoint.
6691 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6692 instead.
6693 (check_breakpoints): Adjust. Use release_breakpoint.
6694 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6695 (breakpoint_inserted_here): Ditto.
6696 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6697 Don't trust the breakpoint's shadow if it is not inserted.
6698 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6699 (delete_all_breakpoints): Adjust.
6700 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6701 use delete_breakpoint_1.
6702
6703 * mem-break.h (breakpoints_supported): Delete declaration.
6704 (set_gdb_breakpoint_at): Declare.
6705 (gdb_breakpoint_here): Declare.
6706 (delete_breakpoint_at): Delete.
6707 (delete_gdb_breakpoint_at): Declare.
6708
6709 * server.h (struct raw_breakpoint): Forward declare.
6710 (struct process_info): New field `raw_breakpoints'.
6711
6712 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6713 breakpoints.
6714
6bf5e0ba
PA
67152010-03-24 Pedro Alves <pedro@codesourcery.com>
6716
6717 * linux-low.c (status_pending_p_callback): Fix comment.
6718 (linux_wait_for_event_1): Move most of the internal breakpoint
6719 handling from here...
6720 (linux_wait_1): ... to here.
6721 (count_events_callback): New.
6722 (select_singlestep_lwp_callback): New.
6723 (select_event_lwp_callback): New.
6724 (cancel_breakpoints_callback): New.
6725 (select_event_lwp): New.
6726 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6727 priority to all LWPs that have had events that should be reported
6728 to the client. Cancel breakpoints when about to reporting the
6729 event to the client, not while stopping lwps. No longer cancel
6730 finished single-steps here.
6731 (cancel_finished_single_step): Delete.
6732 (cancel_finished_single_steps): Delete.
6733
414a389f
PA
67342010-03-24 Pedro Alves <pedro@codesourcery.com>
6735
6736 * mem-break.c (enum bkpt_type): New.
6737 (struct breakpoint): New field `type'.
6738 (set_breakpoint_at): Change return type to struct breakpoint
6739 pointer. Set type to `other_breakpoint' by default.
6740 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6741 in the breakpoint list.
6742 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6743 (reinsert_breakpoint): Rename to ...
6744 (reinsert_raw_breakpoint): ... this.
6745 (reinsert_breakpoints_at): Adjust.
6746 * mem-break.h (struct breakpoint): Declare.
6747 (set_breakpoint_at): Change return type to struct breakpoint
6748 pointer.
6749
2280c721
PA
67502010-03-24 Pedro Alves <pedro@codesourcery.com>
6751
6752 * server.c (handle_query): Assign, not compare.
6753
d50171e4
PA
67542010-03-24 Pedro Alves <pedro@codesourcery.com>
6755
6756 Teach linux gdbserver to step-over-breakpoints.
6757
6758 * linux-low.c (can_hardware_single_step): New.
6759 (supports_breakpoints): New.
6760 (handle_extended_wait): If stopping threads, read the stop pc of
6761 the new cloned LWP.
6762 (get_pc): New.
6763 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6764 low target doesn't support retrieving the PC.
6765 (add_lwp): Set last_resume_kind to resume_continue.
6766 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6767 (linux_attach): Don't clear stop_expected. Set the lwp's
6768 last_resume_kind to resume_stop.
6769 (linux_detach_one_lwp): Don't check for removed breakpoints.
6770 (check_removed_breakpoint): Delete.
6771 (status_pending_p): Rename to ...
6772 (status_pending_p_callback): ... this. Don't check for removed
6773 breakpoints. Don't consider threads that are stopped from GDB's
6774 perspective.
6775 (linux_wait_for_lwp): Always read the stop_pc here.
6776 (cancel_breakpoint): New.
6777 (step_over_bkpt): New global.
6778 (linux_wait_for_event_1): Implement stepping over breakpoints.
6779 (gdb_wants_lwp_stopped): New.
6780 (gdb_wants_all_stopped): New.
6781 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6782 single-step traps here. Store the thread's last reported target
6783 wait status.
6784 (send_sigstop): Don't clear stop_expected. Always set it,
6785 instead.
6786 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6787 (cancel_finished_single_step): New.
6788 (cancel_finished_single_steps): New.
6789 (wait_for_sigstop): Don't cancel finished single-step traps here.
6790 (linux_resume_one_lwp): Don't check for removed breakpoints.
6791 Don't set `step' on non-hardware step archs.
6792 (linux_set_resume_request): Ignore resume_stop requests if already
6793 stopping or stopped. Set the lwp's last_resume_kind.
6794 (resume_status_pending_p): Don't check for removed breakpoints.
6795 (need_step_over_p): New.
6796 (start_step_over): New.
6797 (finish_step_over): New.
6798 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6799 requests. Clear the thread's last reported target waitstatus.
6800 Don't use the `suspended' flag. Don't consider pending breakpoints.
6801 (linux_resume): Start a step-over if necessary.
6802 (proceed_one_lwp): New.
6803 (proceed_all_lwps): New.
6804 (unstop_all_lwps): New.
6805 * linux-low.h (struct lwp_info): Rewrite comment for the
6806 `suspended' flag. Add the `stop_pc' field. Delete the
6807 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6808 Add `'last_resume_kind' and `need_step_over' fields.
6809 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6810 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6811 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6812 (set_raw_breakpoint_at): New.
6813 (set_breakpoint_at): Rewrite to use it.
6814 (reinsert_breakpoint_handler): Delete.
6815 (set_reinsert_breakpoint): New.
6816 (reinsert_breakpoint_by_bp): Delete.
6817 (delete_reinsert_breakpoints): New.
6818 (uninsert_breakpoint): Rewrite.
6819 (uninsert_breakpoints_at): New.
6820 (reinsert_breakpoint): Rewrite.
6821 (reinsert_breakpoints_at): New.
6822 (check_breakpoints): Rewrite.
6823 (breakpoint_here): New.
6824 (breakpoint_inserted_here): New.
6825 (check_mem_read): Adjust.
6826 * mem-break.h (breakpoints_supported, breakpoint_here)
6827 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6828 (reinsert_breakpoint_by_bp): Delete declaration.
6829 (delete_reinsert_breakpoints): Declare.
6830 (reinsert_breakpoint): Delete declaration.
6831 (reinsert_breakpoints_at): Declare.
6832 (uninsert_breakpoint): Delete declaration.
6833 (uninsert_breakpoints_at): Declare.
6834 (check_breakpoints): Adjust prototype.
6835 * server.h: Adjust include order.
6836 (struct thread_info): Declare here. Add a `last_status' field.
6837
30ba68cb
MS
68382010-03-23 Michael Snyder <msnyder@vmware.com>
6839
6840 * server.c (crc32): New function.
6841 (handle_query): Add handling for 'qCRC:' request.
6842
b9a881c2
PA
68432010-03-23 Pedro Alves <pedro@codesourcery.com>
6844
6845 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6846 lwp had been stopped by a watchpoint.
6847
e92d13d5
PA
68482010-03-16 Pedro Alves <pedro@codesourcery.com>
6849
6850 * server.h (internal_error): Declare.
6851 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6852 * utils.c (internal_error): New function.
6853
64daa791
AS
68542010-03-15 Andreas Schwab <schwab@redhat.com>
6855
6856 * configure.srv: Fix typo setting srv_regobj.
6857
f52cd8cd
PA
68582010-03-15 Pedro Alves <pedro@codesourcery.com>
6859
6860 * linux-low.c (fetch_register): Avoid passing a non string literal
6861 format to `error'.
6862 (usr_store_inferior_registers): Ditto.
6863
93ae6fdc
PA
68642010-03-14 Pedro Alves <pedro@codesourcery.com>
6865
6866 * linux-low.c (linux_write_memory): Bail out early if peeking
6867 memory failed.
6868
c3adc08c
PA
68692010-03-14 Pedro Alves <pedro@codesourcery.com>
6870
6871 * linux-low.h (struct lwp_info): New fields
6872 `stopped_by_watchpoint' and `stopped_data_address'.
6873 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6874 here, and cache them in the lwp object.
6875 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6876 directly.
6877 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6878 field.
6879 (linux_stopped_by_watchpoint): Rewrite.
6880 (linux_stopped_data_address): Rewrite.
6881
bce522a2
PA
68822010-03-06 Simo Melenius <simo.melenius@iki.fi>
6883
6884 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6885 switching the current inferior, not before.
6886
90884b2b
L
68872010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6888
6889 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6890 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6891 i386-linux.c and amd64-linux.c.
6892 (reg-i386.o): Removed.
6893 (reg-i386.c): Likewise.
6894 (reg-i386-linux.o): Likewise.
6895 (reg-i386-linux.c): Likewise.
6896 (reg-x86-64.o): Likewise.
6897 (reg-x86-64.c): Likewise.
6898 (reg-x86-64-linux.o): Likewise.
6899 (reg-x86-64-linux.c): Likewise.
6900 (i386.o): New.
6901 (i386.c): Likewise.
6902 (i386-linux.o): Likewise.
6903 (i386-linux.c): Likewise.
6904 (amd64.o): Likewise.
6905 (amd64.c): Likewise.
6906 (amd64-linux.o): Likewise.
6907 (amd64-linux.c): Likewise.
6908
6909 * configure.srv (srv_i386_regobj): New.
6910 (srv_i386_linux_regobj): Likewise.
6911 (srv_amd64_regobj): Likewise.
6912 (srv_amd64_linux_regobj): Likewise.
6913 (srv_i386_32bit_xmlfiles): Likewise.
6914 (srv_i386_64bit_xmlfiles): Likewise.
6915 (srv_i386_xmlfiles): Likewise.
6916 (srv_amd64_xmlfiles): Likewise.
6917 (srv_i386_linux_xmlfiles): Likewise.
6918 (srv_amd64_linux_xmlfiles): Likewise.
6919 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6920 srv_xmlfiles to $srv_i386_xmlfiles.
6921 (i[34567]86-*-mingw32ce*): Likewise.
6922 (i[34567]86-*-mingw*): Likewise.
6923 (i[34567]86-*-nto*): Likewise.
6924 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6925 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6926 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6927 (x86_64-*-linux*): Likewise.
6928
6929 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6930 (init_registers_amd64_linux): New.
6931 (x86_arch_setup): Replace init_registers_x86_64_linux with
6932 init_registers_amd64_linux.
6933
193f13e6
MK
69342010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6935
6936 * configure.ac: Check for libdl. If it is not available link against
6937 static libthread_db.
6938 * configure: Regenerate.
6939
85d721b8
PA
69402010-02-22 Pedro Alves <pedro@codesourcery.com>
6941
6942 PR9605
6943
6944 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6945 handing a read watchpoint.
6946 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6947
6076632b
DE
69482010-02-12 Doug Evans <dje@google.com>
6949
6950 * linux-low.c (linux_supports_tracefork_flag): Document.
6951 (linux_look_up_symbols): Add comment.
6952
3327ccf7
L
69532010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6954
6955 * regcache.c (supply_register): Clear regcache if buf is NULL.
6956
0718675c 69572010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 6958 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
6959
6960 * inferiors.c (find_inferior): Add function documentation.
6961 (unloaded_dll): Handle the case where the unloaded dll has not
6962 been previously registered in the dll list.
6963
177321bd
DJ
69642010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6965
6966 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6967 (thumb2_breakpoint): New.
6968 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6969
2b009048
DJ
69702010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6971
6972 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6973 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6974 breakpoints.
6975
3be029c7
PA
69762010-01-21 Pedro Alves <pedro@codesourcery.com>
6977
6978 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6979
18f5de3b
JK
69802010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6981
6982 * linux-s390-low.c (s390_collect_ptrace_register)
6983 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6984
3743bb4f
DE
69852010-01-21 Doug Evans <dje@google.com>
6986
14ce3065
DE
6987 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6988 (PTRACE_ARG4_TYPE): New macro.
6989 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6990 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6991 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6992 (usr_store_inferior_registers): Ditto.
6993 (linux_read_memory, linux_write_memory): Ditto.
6994 (linux_test_for_tracefork): Ditto.
6995
3743bb4f
DE
6996 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6997 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6998
8b315be5
PA
69992010-01-21 Pedro Alves <pedro@codesourcery.com>
7000
7001 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7002 target.
7003
85492558
PA
70042010-01-21 Pedro Alves <pedro@codesourcery.com>
7005
7006 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7007 prototype to take a regcache. Adjust.
7008
442ea881
PA
70092010-01-20 Pedro Alves <pedro@codesourcery.com>
7010
7011 * regcache.h (struct thread_info): Forward declare.
7012 (struct regcache): New.
7013 (new_register_cache): Adjust prototype.
7014 (get_thread_regcache): Declare.
7015 (free_register_cache): Adjust prototype.
7016 (registers_to_string, registers_from_string): Ditto.
7017 (supply_register, supply_register_by_name, collect_register)
7018 (collect_register_as_string, collect_register_by_name): Ditto.
7019 * regcache.c (struct inferior_regcache_data): Delete.
7020 (get_regcache): Rename to ...
7021 (get_thread_regcache): ... this. Adjust. Switch inferior before
7022 fetching registers.
7023 (regcache_invalidate_one): Adjust.
7024 (regcache_invalidate): Fix prototype.
7025 (new_register_cache): Return the new register cache.
7026 (free_register_cache): Change prototype.
7027 (realloc_register_cache): Adjust.
7028 (registers_to_string): Change prototype to take a regcache. Adjust.
7029 (registers_from_string): Ditto.
7030 (register_data): Ditto.
7031 (supply_register): Ditto.
7032 (supply_register_by_name): Ditto.
7033 (collect_register): Ditto.
7034 (collect_register_as_string): Ditto.
7035 (collect_register_by_name): Ditto.
7036 * server.c (process_serial_event): Adjust.
7037 * linux-low.h (regset_fill_func, regset_store_func): Change
7038 prototype.
7039 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7040 Change prototype.
7041 * linux-low.c (get_stop_pc): Adjust.
7042 (check_removed_breakpoint): Adjust.
7043 (linux_wait_for_event): Adjust.
7044 (linux_resume_one_lwp): Adjust.
7045 (fetch_register): Add regcache parameter. Adjust.
7046 (usr_store_inferior_registers): Ditto.
7047 (regsets_fetch_inferior_registers): Ditto.
7048 (regsets_store_inferior_registers): Ditto.
7049 (linux_fetch_registers, linux_store_registers): Ditto.
7050 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7051 regcache. Adjust.
43aaf8b6
PA
7052 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7053 Ditto.
442ea881
PA
7054 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7055 prototype to take a regcache.
7056 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7057 * remote-utils.c (convert_ascii_to_int, outreg)
7058 (prepare_resume_reply): Change prototype to take a regcache.
7059 Adjust.
7060 * target.h (struct target_ops) <fetch_registers, store_registers>:
7061 Change prototype to take a regcache.
7062 (fetch_inferior_registers, store_inferior_registers): Change
7063 prototype to take a regcache. Adjust.
7064 * proc-service.c (ps_lgetregs): Adjust.
7065 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7066 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7067 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7068 take a regcache. Adjust.
7069 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7070 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7071 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7072 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7073 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7074 (cris_cannot_fetch_register):
7075 (cris_breakpoint_at): Change prototype to take a regcache.
7076 Adjust.
7077 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7078 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7079 to take a regcache. Adjust.
7080 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7081 Adjust.
7082 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7083 take a regcache. Adjust.
7084 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7085 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7086 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7087 * linux-mips-low.c (mips_get_pc):
7088 (mips_set_pc): Change prototype to take a regcache. Adjust.
7089 (mips_reinsert_addr): Adjust.
7090 (mips_collect_register): Change prototype to take a regcache.
7091 Adjust.
7092 (mips_supply_register):
7093 (mips_collect_register_32bit, mips_supply_register_32bit)
7094 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7095 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7096 * linux-ppc-low.c (ppc_supply_ptrace_register)
7097 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7098 (parse_spufs_run): Adjust.
7099 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7100 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7101 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7102 take a regcache. Adjust.
7103 * linux-s390-low.c (s390_collect_ptrace_register)
7104 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7105 (s390_set_pc): Change prototype to take a regcache. Adjust.
7106 (s390_arch_setup): Adjust.
7107 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7108 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7109 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7110 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7111 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7112 regcache. Adjust.
7113 (sparc_breakpoint_at): Adjust.
7114 * linux-xtensa-low.c (xtensa_fill_gregset):
7115 (xtensa_store_gregset):
7116 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7117 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7118 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7119 prototype to take a regcache. Adjust.
7120 * win32-arm-low.c (arm_fetch_inferior_register)
7121 (arm_store_inferior_register): Change prototype to take a
7122 regcache. Adjust.
7123 * win32-i386-low.c (i386_fetch_inferior_register)
7124 (i386_store_inferior_register): Change prototype to take a
7125 regcache. Adjust.
7126 * win32-low.c (child_fetch_inferior_registers)
7127 (child_store_inferior_registers): Change prototype to take a
7128 regcache. Adjust.
7129 (win32_wait): Adjust.
7130 (win32_fetch_inferior_registers): Change prototype to take a
7131 regcache. Adjust.
7132 (win32_store_inferior_registers): Adjust.
7133 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7134 store_inferior_register>: Change prototype to take a regcache.
7135
60c3d7b0
DE
71362010-01-20 Doug Evans <dje@google.com>
7137
7138 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7139 #ifdef.
7140 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7141 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7142
dc146f7c
VP
71432010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7144
7145 * linux-low.c (linux_core_of_thread): New.
7146 (compare_ints, show_process, list_threads): New.
7147 (linux_qxfer_osdata): Report threads and cores.
7148 (linux_target_op): Register linux_core_of_thread.
7149 * remote-utils.c (prepare_resume_reply): Report the core.
7150 (buffer_xml_printf): Support %d specifier.
7151 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7152 New.
7153 (handle_query): Handle qXfer:threads. Announce availability
7154 thereof.
7155 * target.h (struct target_ops): New field core_of_thread.
7156
7803799a
UW
71572010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7158
7159 * Makefile.in (clean): Remove new generated files.
7160 (reg-s390.o, reg-s390.c): Remove rules.
7161 (reg-s390x.o, reg-s390x.c): Likewise.
7162 (s390-linux32.o, s390-linux32.c): Add rules.
7163 (s390-linux64.o, s390-linux64.c): Likewise.
7164 (s390x-linux64.o, s390x-linux64.c): Likewise.
7165 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7166 * linux-s390-low.c: Include <elf.h>.
7167 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7168 (init_registers_s390): Remove prototype.
7169 (init_registers_s390x): Likewise.
7170 (init_registers_s390_linux32): Add prototype.
7171 (init_registers_s390_linux64): Likewise.
7172 (init_registers_s390x_linux64): Likewise.
7173 (s390_num_regs_3264): New define.
7174 (s390_regmap_3264): New global variable.
7175 (s390_cannot_fetch_register): Remove obsolete check.
7176 (s390_cannot_store_register): Likewise.
7177 (s390_collect_ptrace_register): Handle upper/lower register halves.
7178 (s390_supply_ptrace_register): Likewise.
7179 (s390_fill_gregset): Update to register number changes.
7180 (s390_get_hwcap): New routine.
7181 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7182 Install appropriate regmap and register set.
7183
6e7ffa39
JB
71842010-01-01 Joel Brobecker <brobecker@adacore.com>
7185
7186 * server.c (gdbserver_version): Update copyright year to 2010.
7187 * gdbreplay.c (gdbreplay_version): Likewise.
7188
957f3f49
DE
71892009-12-28 Doug Evans <dje@google.com>
7190
7191 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7192 elf/external.h. Include <elf.h> instead but only if necessary.
7193
ca5c370d
PA
71942009-12-28 Pedro Alves <pedro@codesourcery.com>
7195
7196 * linux-low.c (linux_remove_process): Remove `detaching'
7197 parameter. Don't release/detach from thread_db here.
7198 (linux_kill): Release/detach from thread_db here, ...
7199 (linux_detach): ... and here, before actually detaching.
7200 (linux_wait_1): ... and here, when a process exits.
7201 * thread-db.c (any_thread_of): New.
7202 (thread_db_free): Switch the current inferior to a thread of the
7203 passed in process.
7204
4ee62156
DE
72052009-12-21 Doug Evans <dje@google.com>
7206
d90e6a88
DE
7207 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7208
c5f62d5f
DE
7209 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7210 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7211 warning ifndef __NR_tkill. Move setting of errno there too.
7212 Delete unnecessary resetting of errno after syscall.
7213 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7214
10e86dd7
DE
7215 * configure.ac: Check for dladdr.
7216 * config.in: Regenerate.
7217 * configure: Regenerate.
7218 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7219 (try_thread_db_load): Update.
7220
4ee62156
DE
7221 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7222
00f515da
DE
72232009-12-18 Doug Evans <dje@google.com>
7224
e9464885
DE
7225 * event-loop.c: Include unistd.h if it exists.
7226
07d4f67e
DE
7227 * linux-low.c (my_waitpid): Move definition away from being in
7228 between linux_tracefork_child/linux_test_for_tracefork.
7229
00f515da
DE
7230 * gdb_proc_service.h (psaddr_t): Fix type.
7231 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7232 signature to match glibc.
7233
1de1badb
DE
72342009-12-16 Doug Evans <dje@google.com>
7235
7236 * linux-low.c (linux_read_memory): Fix argument to read.
7237
aeeb81d1
PA
72382009-11-26 Pedro Alves <pedro@codesourcery.com>
7239
7240 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7241 events, don't leave current_inferior pointing at null.
7242
10357975
PA
72432009-11-26 Pedro Alves <pedro@codesourcery.com>
7244
7245 * win32-low.c (LOG): Delete.
7246 (OUTMSG): Output to stderr.
7247 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7248 on compile time LOG macro.
7249 (win32_wait): Fix debug output.
7250
cf6e3471
PA
72512009-11-26 Pedro Alves <pedro@codesourcery.com>
7252
7253 * win32-low.c (win32_add_one_solib): If the dll name is
7254 "ntdll.dll", prepend the system directory to the dll path.
7255
0c85e18e
MK
72562009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7257
7258 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7259
9ac544ce 72602009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7261 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7262
7263 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7264 * configure.ac: Check for __mcoldfire__ and set
7265 gdb_cv_m68k_is_coldfire.
7266 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7267 reg-cf.o and reg-m68k.o.
7268 * configure: Regenerated.
7269
fd7dd3e6
PA
72702009-11-16 Pedro Alves <pedro@codesourcery.com>
7271
7272 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7273 Pass it to thread_db_free.
7274 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7275 proper `detaching' argument to linux_remove_process.
7276 * linux-low.h (thread_db_free): Add `detaching' parameter.
7277 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7278 to thread_db_free.
7279 (thread_db_free): Add `detaching' parameter. Only
7280 call td_ta_clear_event if detaching from process.
7281
75aa492e
MK
72822009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7283
7284 * thread-db.c (thread_db_free): Fix typo.
7285
21e1bee4
PP
72862009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7287
7288 PR gdb/10838
7289 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7290
8838b45e
NS
72912009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7292
7293 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7294 with an i686 compiler.
7295 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7296 needed.
7297 * configure: Rebuilt.
7298
8a35fb51
SL
72992009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7300
7301 PR gdb/10783
7302
7303 * server.c (handle_search_memory_1): Correct read_addr initialization
7304 in loop for searching subsequent chunks.
7305
96f15937
PP
73062009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7307
7308 * configure.ac: New --with-libthread-db option.
7309 * thread-db.c: Allow direct dependence on libthread_db.
7310 (thread_db_free): Adjust.
7311 * config.in: Regenerate.
7312 * configure: Likewise.
889bf7c5 7313
5f7d1694
PP
73142009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7315
7316 PR gdb/10757
7317 * thread-db.c (attach_thread): New function.
7318 (maybe_attach_thread): Return success/failure.
7319 (find_new_threads_callback): Adjust.
889bf7c5
PA
7320 (thread_db_find_new_threads): Loop until no new threads.
7321
88e3b899
PA
73222009-10-13 Pedro Alves <pedro@codesourcery.com>
7323
7324 * proc-service.c (ps_lgetregs): Formatting.
7325
cdbfd419
PP
73262009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7327
7328 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7329 * configure.ac: Adjust.
7330 * linux-low.h (struct process_info_private): Move members to struct
7331 thread_db.
7332 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7333 * linux-low.c (linux_remove_process): Adjust.
7334 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7335 * server.c (handle_query): Move code ...
7336 (handle_monitor_command): ... here. New function.
7337 * target.h (struct target_ops): New member.
7338 * thread-db.c (struct thread_db): New.
7339 (libthread_db_search_path): New variable.
7340 (thread_db_create_event, thread_db_enable_reporting)
7341 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7342 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7343 (try_thread_db_load_1, dladdr_to_soname): New functions.
7344 (try_thread_db_load, thread_db_load_search): New functions.
7345 (thread_db_init): Search for libthread_db.
7346 (thread_db_free): New function.
7347 (thread_db_handle_monitor_command): Likewise.
7348 * config.in: Regenerate.
7349 * configure: Regenerate.
889bf7c5 7350
4168d2d6
UW
73512009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7352
7353 * spu-low.c (spu_kill): Wait for inferior to terminate.
7354 Call clear_inferiors.
7355 (spu_detach): Call clear_inferiors.
7356
81ecdfbb
RW
73572009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7358
7359 * aclocal.m4: Regenerate.
7360 * config.in: Likewise.
7361 * configure: Likewise.
7362
0b9ff2c0
UW
73632009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7364
7365 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7366 (parse_spufs_run): New function.
7367 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7368 (ppc_breakpoint_at): Handle SPU breakpoints.
7369
efcbbd14
UW
73702009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7371
7372 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7373 (SPUFS_MAGIC): Define.
7374 (spu_enumerate_spu_ids): New function.
7375 (linux_qxfer_spu): New function.
7376 (linux_target_ops): Install linux_qxfer_spu.
7377
f4d9bade
UW
73782009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7379
7380 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7381 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7382 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7383 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7384 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7385 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7386 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7387 (init_registers_powerpc_cell32l): Add prototype.
7388 (init_registers_powerpc_cell64l): Likewise.
7389 (ppc_arch_setup): Detect Cell/B.E. architecture.
7390
96e946ca
RW
73912009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7392
7393 * Makefile.in (datarootdir): New variable.
7394
58d6951d
DJ
73952009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7396
7397 * linux-low.c (linux_write_memory): Update debugging output.
7398 * Makefile.in (clean): Add new descriptions.
7399 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7400 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7401 * configure.srv: Add new files for arm*-*-linux*.
7402 * linux-arm-low.c: Add new declarations.
7403 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7404 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7405 (HWCAP_VFPv3D16): New.
7406 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7407 instead of __IWMMXT__.
7408 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7409 (arm_arch_setup): New.
7410 (target_regsets): Remove #ifdef. Add VFP regset.
7411 (the_low_target): Use arm_arch_setup.
7412
12b42a12
DJ
74132009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7414
7415 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7416 the main thread again.
7417
ac8c974e
AR
74182009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7419
7420 Adding Neutrino gdbserver.
7421 * configure: Regenerated.
7422 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7423 * configure.srv (i[34567]86-*-nto*): New target.
7424 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7425 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7426 (nto_comctrl) [__QNX__]: New function.
7427 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7428
4424e0c3 74292009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7430
7431 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7432 srv_tgtobj.
7433
912cf4ba
PA
74342009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7435 Pedro Alves <pedro@codesourcery.com>
7436
7437 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7438 don't support CONTEXT_EXTENDED_REGISTERS.
7439 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7440 (the_low_target): Install them.
7441 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7442 failing with ERROR_PIPE_NOT_CONNECTED.
7443
aa5ca48f
DE
74442009-06-30 Doug Evans <dje@google.com>
7445 Pierre Muller <muller@ics.u-strasbg.fr>
7446
7447 Add h/w watchpoint support to x86-linux, win32-i386.
7448 * Makefile.in (SFILES): Add i386-low.c
7449 (i386_low_h): Define.
7450 (i386-low.o): Add dependencies.
7451 (linux-x86-low.o): Add i386-low.h dependency.
7452 (win32-i386-low.o): Ditto.
7453 * i386-low.c: New file.
7454 * i386-low.h: New file.
7455 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7456 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7457 * linux-low.c (linux_add_process): Initialize arch_private.
7458 (linux_remove_process): Free arch_private.
7459 (add_lwp): Initialize arch_private.
7460 (delete_lwp): Free arch_private.
7461 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7462 provided.
7463 * linux-low.h (process_info_private): New member arch_private.
7464 (lwp_info): New member arch_private.
7465 (linux_target_ops): New members new_process, new_thread,
7466 prepare_to_resume.
7467 (ptid_of): New macro.
7468 * linux-x86-low.c: Include stddef.h, i386-low.h.
7469 (arch_process_info): New struct.
7470 (arch_lwp_info): New struct.
7471 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7472 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7473 (i386_dr_low_get_status): New function.
7474 (x86_insert_point, x86_remove_point): New functions.
7475 (x86_stopped_by_watchpoint): New function.
7476 (x86_stopped_data_address): New function.
7477 (x86_linux_new_process, x86_linux_new_thread): New functions.
7478 (x86_linux_prepare_to_resume): New function.
7479 (the_low_target): Add entries for insert_point, remove_point,
7480 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7481 prepare_to_resume.
7482 * server.c (debug_hw_points): New global.
7483 (monitor_show_help): Document set debug-hw-points.
7484 (handle_query): Process "set debug-hw-points".
7485 * server.h (debug_hw_points): Declare.
7486 (paddress): Declare.
7487 * utils.c (NUMCELLS, CELLSIZE): New macros.
7488 (get_sell, xsnprintf, paddress): New functions.
7489 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7490 remove_point, stopped_by_watchpoint, stopped_data_address.
7491 * win32-i386-low.c: Include i386-low.h.
7492 (debug_reg_state): Replaces dr.
7493 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7494 (i386_dr_low_get_status): New function.
7495 (i386_insert_point, i386_remove_point): New functions.
7496 (i386_stopped_by_watchpoint): New function.
7497 (i386_stopped_data_address): New function.
7498 (i386_initial_stuff): Update.
7499 (get_thread_context,set_thread_context,i386_thread_added): Update.
7500 (the_low_target): Add entries for insert_point,
7501 remove_point, stopped_by_watchpoint, stopped_data_address.
7502 * win32-low.c (win32_insert_watchpoint): New function.
7503 (win32_remove_watchpoint): New function.
7504 (win32_stopped_by_watchpoint): New function.
7505 (win32_stopped_data_address): New function.
7506 (win32_target_ops): Add entries for insert_watchpoint,
7507 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7508 * win32-low.h (win32_target_ops): New members insert_point,
7509 remove_point, stopped_by_watchpoint, stopped_data_address.
7510
d993e290
PA
75112009-06-25 Pedro Alves <pedro@codesourcery.com>
7512
7513 * server.c (process_serial_event): Re-return unsupported, not
7514 error, if the type isn't recognized. Re-allow supporting only
7515 insert or remove packets. Also call require_running for
7516 breakpoints. Add missing break statement to default case. Tidy.
7517 * target.h (struct target_ops): Rename insert_watchpoint to
7518 insert_point, and remove_watchpoint to remove_point.
7519
7520 * linux-low.h (struct linux_target_ops): Likewise.
7521 * linux-low.c (linux_insert_watchpoint): Rename to ...
7522 (linux_insert_point): ... this. Adjust.
7523 (linux_remove_watchpoint): Rename to ...
7524 (linux_remove_point): ... this. Adjust.
7525 (linux_target_ops): Adjust.
7526 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7527 (cris_insert_point): ... this.
7528 (cris_remove_watchpoint): Rename to ...
7529 (cris_remove_point): ... this.
7530 (the_low_target): Adjust.
7531
0f54c268
PM
75322009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7533
7534 * server.c (handle_v_kill): Pass signal_pid to
7535 kill_inferior if multi_process is zero.
7536
c6314022
AR
75372009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7538
7539 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7540 * target.h (target_ops): Comment for *_watchpoint to make it clear
7541 the functions can get types '0' and '1'.
7542
4463ce24
AR
75432009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7544
7545 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7546 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7547 * regcache.c (get_regcache): Likewise.
7548 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7549 * win32-low.c (child_fetch_inferior_registers): Remove check for
7550 regno 0.
7551
cf8fd78b
PA
75522009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7553 Pedro Alves <pedro@codesourcery.com>
7554
7555 * target.h (struct target_ops) <supports_multi_process>: New
7556 callback.
7557 (target_supports_multi_process): New.
7558 * server.c (handle_query): Even if GDB reports support, only
7559 enable multi-process if the target also supports it. Report
7560 multi-process support only if the target backend supports it.
7561 * linux-low.c (linux_supports_multi_process): New function.
7562 (linux_target_ops): Install it as target_supports_multi_process
7563 callback.
7564
47c0c975
DE
75652009-05-24 Doug Evans <dje@google.com>
7566
e09875d4
DE
7567 Global renaming of find_thread_pid to find_thread_ptid.
7568 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7569 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7570 All callers updated.
7571
e27d73f6
DE
7572 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7573 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7574 directly.
7575
47c0c975
DE
7576 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7577 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7578 (linux_resume_one_lwp): Ditto.
7579
2acc282a
DE
75802009-05-23 Doug Evans <dje@google.com>
7581
7582 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7583 from struct inferior_list_entry * to struct lwp_info *.
7584 All callers updated.
7585
9f1036c1
DE
75862009-05-13 Doug Evans <dje@google.com>
7587
7588 * linux-x86-low.c: Don't include assert.h.
7589 (x86_siginfo_fixup): Use fatal, not assert.
7590 (x86_arch_setup): Fix comment.
7591
d0722149
DE
75922009-05-12 Doug Evans <dje@google.com>
7593
7594 Biarch support for i386/amd64 gdbserver.
7595 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7596 Add linux-x86-low.c.
7597 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7598 (linux-x86-low.o): Add.
7599 * linux-x86-64-low.c: Delete.
7600 * linux-i386-low.c: Delete.
7601 * linux-x86-low.c: New file.
7602 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7603 linux-x86-low.o.
7604 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7605 linux-x86-low.o.
7606 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7607 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7608 (linux_child_pid_to_exec_file): New function.
7609 (elf_64_header_p, elf_64_file_p): New functions.
7610 (siginfo_fixup): New function.
7611 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7612 give target a chance to convert layout.
7613 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7614 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7615
fdeb2a12
DE
76162009-05-07 Doug Evans <dje@google.com>
7617
7618 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7619 (regsets_store_inferior_registers): Ditto.
7620
a6dbe5df
PA
76212009-05-06 Pedro Alves <pedro@codesourcery.com>
7622
7623 PR server/10048
7624
7625 * linux-low.c (must_set_ptrace_flags): Delete.
7626 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7627 of the global.
7628 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7629 `lwp->must_set_ptrace_flags' instead.
ba42693b 7630 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7631 (linux_wait_1): ... not here.
7632
5091eb23
DE
76332009-04-30 Doug Evans <dje@google.com>
7634
9f767825
DE
7635 * inferiors.c (started_inferior_callback): New function.
7636 (attached_inferior_callback): New function.
7637 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7638 * server.c (print_started_pid, print_attached_pid): New functions.
7639 (detach_or_kill_for_exit): New function.
7640 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7641 * server.h (have_started_inferiors_p): Declare.
7642 (have_attached_inferiors_p): Declare.
7643
5091eb23
DE
7644 * inferiors.c (remove_process): Fix memory leak, free process.
7645 * linux-low.c (linux_remove_process): New function.
7646 (linux_kill): Call it instead of remove_process.
7647 (linux_detach, linux_wait_1): Ditto.
7648
155c8968
PA
76492009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7650
7651 * configure.srv: Add x86 Windows CE target.
7652
7fe519cb
UW
76532009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7654
7655 * inferiors.c (get_thread_process): Make global.
7656 * server.h (get_thread_process): Add prototype.
7657 * thread-db.c (find_one_thread): Use get_thread_process
7658 instead of current_process.
7659 (thread_db_get_tls_address): Do not crash if called when
7660 thread layer is not yet initialized.
7661
5472f405
UW
76622009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7663
7664 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7665 * spu-low.c (current_tid): Rename to ...
7666 (current_ptid): ... this.
7667 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7668 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7669 ptid_get_lwp (current_ptid) instead of current_tid.
7670 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7671 instead of current_tid. Use find_process_pid to verify pid
7672 argument is valid. Pass proper argument to remove_process.
7673 (spu_thread_alive): Compare current_ptid instead of current_tid.
7674 (spu_resume): Likewise.
7675
55ac2b99
PA
76762009-04-02 Pedro Alves <pedro@codesourcery.com>
7677
7678 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7679 variable.
7680
95954743
PA
76812009-04-01 Pedro Alves <pedro@codesourcery.com>
7682
7683 Implement the multiprocess extensions, and add linux multiprocess
7684 support.
7685
7686 * server.h (ULONGEST): Declare.
7687 (struct ptid, ptid_t): New.
7688 (minus_one_ptid, null_ptid): Declare.
7689 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7690 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7691 (struct inferior_list_entry): Change `id' type from unsigned from
7692 to ptid_t.
7693 (struct sym_cache, struct breakpoint, struct
7694 process_info_private): Forward declare.
7695 (struct process_info): Declare.
7696 (current_process): Declare.
7697 (all_processes): Declare.
7698 (initialize_inferiors): Declare.
7699 (add_thread): Adjust to use ptid_t.
7700 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7701 (add_process, remove_process, find_thread_pid): Declare.
7702 (find_inferior_id): Adjust to use ptid_t.
7703 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7704 (multi_process): Declare.
7705 (push_event): Adjust to use ptid_t.
7706 (read_ptid, write_ptid): Declare.
7707 (prepare_resume_reply): Adjust to use ptid_t.
7708 (clear_symbol_cache): Declare.
7709 * inferiors.c (all_processes): New.
7710 (null_ptid, minus_one_ptid): New.
7711 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7712 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7713 (add_thread): Change unsigned long to ptid. Remove gdb_id
7714 parameter. Adjust.
7715 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7716 (gdb_id_to_thread): Rename to ...
7717 (find_thread_pid): ... this. Change unsigned long to ptid.
7718 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7719 (loaded_dll, pull_pid_from_list): Adjust.
7720 (add_process, remove_process, find_process_pid)
7721 (get_thread_process, current_process, initialize_inferiors): New.
7722 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7723 (struct target_waitstatus) <related_pid>: Ditto.
7724 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7725 return type to int.
7726 (struct target_ops) <join>: Add `pid' argument.
7727 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7728 (struct target_ops) <wait>: Add `ptid' field. Change return type
7729 to ptid.
7730 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7731 (mywait): Add `ptid' argument. Change return type to ptid_t.
7732 (target_pid_to_str): Declare.
7733 * target.c (set_desired_inferior): Adjust to use ptids.
7734 (mywait): Add new `ptid' argument. Adjust.
7735 (target_pid_to_str): New.
7736 * mem-break.h (free_all_breakpoints): Declare.
7737 * mem-break.c (breakpoints): Delelete.
7738 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7739 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7740 to use per-process breakpoint list.
7741 (free_all_breakpoints): New.
7742 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7743 (symbol_cache, all_symbols_looked_up): Delete.
7744 (hexchars): New.
7745 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7746 read_ptid): New.
7747 (prepare_resume_reply): Change ptid argument's type from unsigned
7748 long to ptid_t. Adjust. Implement W;process and X;process.
7749 (free_sym_cache, clear_symbol_cache): New.
7750 (look_up_one_symbol): Adjust to per-process symbol cache. *
7751 * server.c (cont_thread, general_thread, step_thread): Change type
7752 to ptid_t.
7753 (attached): Delete.
7754 (multi_process): New.
7755 (last_ptid): Change type to ptid_t.
7756 (struct vstop_notif) <ptid>: Change type to ptid_t.
7757 (queue_stop_reply, push_event): Change `ptid' argument's type to
7758 ptid_t.
7759 (discard_queued_stop_replies): Add `pid' argument.
7760 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7761 changes. Don't reference the `attached' global.
7762 (attach_inferior): Adjust to mywait interface changes.
7763 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7764 features. Handle and report "multiprocess+". Handle
7765 "qAttached:PID".
7766 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7767 changes.
7768 (handle_v_kill): New.
7769 (handle_v_stopped): Adjust to use target_pid_to_str.
7770 (handle_v_requests): Allow multiple attaches and runs when
7771 multiprocess extensions are in effect. Handle "vKill".
7772 (myresume): Adjust to use ptids.
7773 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7774 (handle_status): Adjust to discard_queued_stop_replies interface
7775 change.
7776 (first_thread_of, kill_inferior_callback)
7777 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7778 (main): Call initialize_inferiors. Adjust to use ptids, killing
7779 and detaching from all inferiors. Handle multiprocess packet
7780 variants.
7781 * linux-low.h: Include gdb_proc_service.h.
7782 (struct process_info_private): New.
7783 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7784 <lwpid_of>: Use ptid_get_lwp.
7785 (get_lwp_thread): Adjust.
7786 (struct lwp_info): Add `dead' member.
7787 (find_lwp_pid): Declare.
7788 * linux-low.c (thread_db_active): Delete.
7789 (new_inferior): Adjust comment.
7790 (inferior_pid): Delete.
7791 (linux_add_process): New.
7792 (handle_extended_wait): Adjust.
7793 (add_lwp): Change unsigned long to ptid.
7794 (linux_create_inferior): Add process to processes table. Adjust
7795 to use ptids. Don't set new_inferior here.
7796 (linux_attach_lwp): Rename to ...
7797 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7798 it. Adjust to use ptids.
7799 (linux_attach_lwp): New.
7800 (linux_attach): Add process to processes table. Don't set
7801 new_inferior here.
7802 (struct counter): New.
7803 (second_thread_of_pid_p, last_thread_of_process_p): New.
7804 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7805 multiple processes.
7806 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7807 processes. Remove process from process table.
7808 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7809 to multiple processes.
7810 (any_thread_of): New.
7811 (linux_detach): Add `pid' argument, and handle it. Remove process
7812 from processes table.
7813 (linux_join): Add `pid' argument. Handle it.
7814 (linux_thread_alive): Change unsighed long argument to ptid_t.
7815 Consider dead lwps as not being alive.
7816 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7817 threads we're not interested in.
7818 (same_lwp, find_lwp_pid): New.
7819 (linux_wait_for_lwp): Change `pid' argument's type from int to
7820 ptid_t. Adjust.
7821 (linux_wait_for_event): Rename to ...
7822 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7823 from int to ptid_t. Adjust.
7824 (linux_wait_for_event): New.
7825 (linux_wait_1): Add `ptid' argument. Change return type to
7826 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7827 that exit from the process table.
7828 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7829 Adjust.
7830 (mark_lwp_dead): New.
7831 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7832 stopping all threads, mark its main lwp as dead.
7833 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7834 ptids.
7835 (fetch_register, usr_store_inferior_registers)
7836 (regsets_fetch_inferior_registers)
7837 (regsets_store_inferior_registers, linux_read_memory)
7838 (linux_write_memory): Inline `inferior_pid'.
7839 (linux_look_up_symbols): Adjust to use per-process
7840 `thread_db_active'.
7841 (linux_request_interrupt): Adjust to use ptids.
7842 (linux_read_auxv): Inline `inferior_pid'.
7843 (initialize_low): Don't reference thread_db_active.
7844 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7845 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7846 (ps_getpid): Return the pid of the current inferior.
7847 * thread-db.c (proc_handle, thread_agent): Delete.
7848 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7849 per-process data.
7850 (find_one_thread): Change argument type to ptid_t. Adjust to
7851 per-process data.
7852 (maybe_attach_thread): Adjust to per-process data and ptids.
7853 (thread_db_find_new_threads): Ditto.
7854 (thread_db_init): Ditto.
7855 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7856 processes table. Adjust to use ptids.
7857 (spu_kill, spu_detach): Adjust interface. Remove process from
7858 processes table.
7859 (spu_join, spu_thread_alive): Adjust interface.
7860 (spu_wait): Adjust interface. Remove process from processes
7861 table. Adjust to use ptids.
7862 * win32-low.c (current_inferior_tid): Delete.
7863 (current_inferior_ptid): New.
7864 (debug_event_ptid): New.
7865 (thread_rec): Take a ptid. Adjust.
7866 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7867 (child_delete_thread): Ditto.
7868 (do_initial_child_stuff): Add `attached' argument. Add process to
7869 processes table.
7870 (child_fetch_inferior_registers, child_store_inferior_registers):
7871 Adjust.
7872 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7873 (win32_attach): Pass 1 to do_initial_child_stuff.
7874 (win32_kill): Adjust interface. Remove process from processes
7875 table.
7876 (win32_detach): Ditto.
7877 (win32_join): Adjust interface.
7878 (win32_thread_alive): Take a ptid.
7879 (win32_resume): Adjust to use ptids.
7880 (get_child_debug_event): Ditto.
7881 (win32_wait): Adjust interface. Remove exiting process from
7882 processes table.
7883
bd99dc85
PA
78842009-04-01 Pedro Alves <pedro@codesourcery.com>
7885
7886 Non-stop mode support.
7887
7888 * server.h (non_stop): Declare.
7889 (gdb_client_data, handler_func): Declare.
7890 (delete_file_handler, add_file_handler, start_event_loop):
7891 Declare.
7892 (handle_serial_event, handle_target_event, push_event)
7893 (putpkt_notif): Declare.
7894 * target.h (enum resume_kind): New.
7895 (struct thread_resume): Replace `step' field by `kind' field.
7896 (TARGET_WNOHANG): Define.
7897 (struct target_ops) <wait>: Add `options' argument.
7898 <supports_non_stop, async, start_non_stop>: New fields.
7899 (target_supports_non_stop, target_async): New.
7900 (start_non_stop): Declare.
7901 (mywait): Add `options' argument.
7902 * target.c (mywait): Add `options' argument. Print child exit
7903 notifications here.
7904 (start_non_stop): New.
7905 * server.c (non_stop, own_buf, mem_buf): New globals.
7906 (struct vstop_notif): New.
7907 (notif_queue): New global.
7908 (queue_stop_reply, push_event, discard_queued_stop_replies)
7909 (send_next_stop_reply): New.
7910 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7911 interface changes.
7912 (attach_inferior): In non-stop mode, don't wait for the target
7913 here.
7914 (handle_general_set): Handle QNonStop.
7915 (handle_query): When handling qC, return the current general
7916 thread, instead of the first thread of the list.
7917 (handle_query): If the backend supports non-stop mode, include
7918 QNonStop+ in the qSupported query response.
7919 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7920 and non-stop mode.
7921 (handle_v_attach, handle_v_run): Handle non-stop mode.
7922 (handle_v_stopped): New.
7923 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7924 (myresume): Adjust to use resume_kind. Handle non-stop.
7925 (queue_stop_reply_callback): New.
7926 (handle_status): Handle non-stop mode.
7927 (main): Clear non_stop flag on reconnection. Use the event-loop.
7928 Refactor serial protocol handling from here ...
7929 (process_serial_event): ... to this new function. When GDB
7930 selects any thread, select one here. In non-stop mode, wait until
7931 GDB acks all pending events before exiting.
7932 (handle_serial_event, handle_target_event): New.
7933 * remote-utils.c (remote_open): Install remote_desc in the event
7934 loop.
7935 (remote_close): Remove remote_desc from the event loop.
7936 (putpkt_binary): Rename to...
7937 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7938 (putpkt_binary): New as wrapper around putpkt_binary_1.
7939 (putpkt_notif): New.
7940 (prepare_resume_reply): In non-stop mode, don't change the
7941 general_thread.
7942 * event-loop.c: New.
7943 * Makefile.in (OBJ): Add event-loop.o.
7944 (event-loop.o): New rule.
7945
7946 * linux-low.h (pid_of): Moved here.
7947 (lwpid_of): New.
7948 (get_lwp_thread): Use lwpid_of.
7949 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7950 * linux-low.c (pid_of): Delete.
7951 (inferior_pid): Use lwpid_of.
7952 (linux_event_pipe): New.
7953 (target_is_async_p): New.
7954 (delete_lwp): New.
7955 (handle_extended_wait): Use lwpid_of.
7956 (add_lwp): Don't set lwpid field.
7957 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7958 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7959 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7960 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7961 first. Adjust to linux_wait_for_event interface changes. Use
7962 lwpid_of.
7963 (linux_detach): Don't delete the main lwp here.
7964 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7965 (status_pending_p): Don't consider explicitly suspended lwps.
7966 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7967 pointer. Add OPTIONS argument. Change return type to int. Use
7968 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7969 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7970 pointer. Add status pointer argument. Return a pid instead of a
7971 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7972 changes. In non-stop mode, don't switch to a random thread.
7973 (linux_wait): Rename to...
7974 (linux_wait_1): ... this. Add target_options argument, and handle
7975 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7976 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7977 clean exit and signal exit code. Don't stop all threads in
7978 non-stop mode. In all-stop mode, only stop all threads when
7979 reporting a stop to GDB. Handle explicit thread stop requests.
7980 (async_file_flush, async_file_mark): New.
7981 (linux_wait): New.
7982 (send_sigstop): Use lwpid_of.
7983 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7984 interface changes. In non-stop mode, don't switch to a random
7985 thread.
7986 (linux_resume_one_lwp): Use lwpid_of.
7987 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7988 (linux_resume_one_thread): ... this. Handle resume_stop. In
7989 non-stop mode, don't look for pending flag in all threads.
7990 (resume_status_pending_p): Don't consider explicitly suspended
7991 threads.
7992 (my_waitpid): Reimplement. Emulate __WALL.
7993 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7994 Use lwpid_of.
7995 (sigchld_handler, linux_supports_non_stop, linux_async)
7996 (linux_start_non_stop): New.
7997 (linux_target_ops): Register linux_supports_non_stop, linux_async
7998 and linux_start_non_stop.
7999 (initialize_low): Install SIGCHLD handler.
8000 * thread-db.c (thread_db_create_event, find_one_thread)
8001 (thread_db_get_tls_address): Use lwpid_of.
8002 * win32-low.c (win32_detach): Adjust to use resume_kind.
8003 (win32_wait): Add `options' argument.
8004 * spu-low.c (spu_resume): Adjust to use resume_kind.
8005 (spu_wait): Add `options' argument.
8006
5b1c542e
PA
80072009-04-01 Pedro Alves <pedro@codesourcery.com>
8008
8009 Decouple target code from remote protocol.
8010
8011 * target.h (enum target_waitkind): New.
8012 (struct target_waitstatus): New.
8013 (struct target_ops) <wait>: Return an unsigned long. Take a
8014 target_waitstatus pointer instead of a char pointer.
8015 (mywait): Likewise.
8016 * target.c (mywait): Change prototype to return an unsigned long.
8017 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8018 * server.h (thread_from_wait, old_thread_from_wait): Delete
8019 declarations.
8020 (prepare_resume_reply): Change prototype to take a
8021 target_waitstatus.
8022 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8023 (last_status, last_ptid): New.
8024 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8025 pid instead of a signal.
8026 (attach_inferior): Remove "status" and "signal" parameters.
8027 Adjust.
8028 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8029 not as an address.
8030 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8031 (handle_v_requests, myresume): Remove "status" and "signal"
8032 parameters. Adjust.
8033 (handle_status): New.
8034 (main): Delete local `status'. Adjust.
8035 * remote-utils.c: Include target.h.
8036 (prepare_resume_reply): Change prototype to take a
8037 target_waitstatus. Adjust.
8038
8039 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8040 interface.
8041 * spu-low.c (spu_wait): Adjust.
8042 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8043 Delete.
8044 (win32_wait): Adjust.
8045
2bd7c093
PA
80462009-04-01 Pedro Alves <pedro@codesourcery.com>
8047
8048 * target.h (struct thread_resume): Delete leave_stopped member.
8049 (struct target_ops): Add a `n' argument to the `resume' callback.
8050 * server.c (start_inferior): Adjust.
8051 (handle_v_cont, myresume): Adjust.
8052 * linux-low.c (check_removed_breakpoint): Adjust to resume
8053 interface change, and to removed leave_stopped field.
8054 (resume_ptr): Delete.
8055 (struct thread_resume_array): New.
8056 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8057 resume interface change.
8058 (linux_continue_one_thread, linux_queue_one_thread)
8059 (resume_status_pending_p): Check if the resume field is NULL
8060 instead of checking the leave_stopped member.
8061 (linux_resume): Adjust to the target resume interface change.
8062 * spu-low.c (spu_resume): Adjust to the target resume interface
8063 change.
8064 * win32-low.c (win32_detach, win32_resume): Ditto.
8065
c35fafde
PA
80662009-04-01 Pedro Alves <pedro@codesourcery.com>
8067
8068 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8069 flag.
8070 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8071 pending.
8072 (linux_continue_one_thread): Only preserve the stepping flag if
8073 there's a pending breakpoint.
8074
0a59d50b
PA
80752009-03-31 Pedro Alves <pedro@codesourcery.com>
8076
8077 * server.c (main): After the inferior having exited, call
8078 remote_close before exiting gdbserver.
8079
f04c6d38
TJB
80802009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8081
8082 Fix size of FPSCR in Power 7 processors.
8083 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8084 (PPC_FEATURE_HAS_DFP): New #define.
8085 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8086 size of the FPSCR.
8087
78e5cee6
PA
80882009-03-23 Pedro Alves <pedro@codesourcery.com>
8089
8090 * server.c (handle_query) Whitespace and formatting.
8091
1b3f6016
PA
80922009-03-22 Pedro Alves <pedro@codesourcery.com>
8093
8094 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8095 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8096 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8097 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8098 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8099 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8100 Makefile.in, configure.ac: Fix whitespace throughout.
8101 * configure: Regenerate.
8102
a07b2135
PA
81032009-03-22 Pedro Alves <pedro@codesourcery.com>
8104
8105 * inferiors.c (find_inferior): Make it safe for the callback
8106 function to delete the currently iterated inferior.
8107
67cc2626
PA
81082009-03-22 Pedro Alves <pedro@codesourcery.com>
8109
8110 * Makefile.in (linuw_low_h): Move higher.
8111 (thread-db.o): Depend on $(linux_low_h).
8112
54a0b537
PA
81132009-03-17 Pedro Alves <pedro@codesourcery.com>
8114
8115 Rename "process" to "lwp" throughout.
8116
8117 * linux-low.c (all_processes): Rename to...
8118 (all_lwps): ... this.
8119 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8120 (add_process): Rename to ...
8121 (add_lwp): ... this. Adjust.
8122 (linux_create_inferior): Adjust.
8123 (linux_attach_lwp): Adjust.
8124 (linux_attach): Adjust.
8125 (linux_kill_one_process): Rename to ...
8126 (linux_kill_one_lwp): ... this. Adjust.
8127 (linux_kill): Adjust.
8128 (linux_detach_one_process): Rename to ...
8129 (linux_detach_one_lwp): ... this. Adjust.
8130 (linux_detach): Adjust.
8131 (check_removed_breakpoint): Adjust.
8132 (status_pending_p): Adjust.
8133 (linux_wait_for_process): Rename to ...
8134 (linux_wait_for_lwp): ... this. Adjust.
8135 (linux_wait_for_event): Adjust.
8136 (send_sigstop): Adjust.
8137 (wait_for_sigstop): Adjust.
8138 (stop_all_processes): Rename to ...
8139 (stop_all_lwps): ... this.
8140 (linux_resume_one_process): Rename to ...
8141 (linux_resume_one_lwp): ... this. Adjust.
8142 (linux_set_resume_request, linux_continue_one_thread)
8143 (linux_queue_one_thread, resume_status_pending_p)
8144 (usr_store_inferior_registers, regsets_store_inferior_registers)
8145 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8146 Adjust.
8147 * linux-low.h (get_process): Rename to ...
8148 (get_lwp): ... this. Adjust.
8149 (get_thread_process): Rename to ...
8150 (get_thread_lwp): ... this. Adjust.
8151 (get_process_thread): Rename to ...
8152 (get_lwp_thread): ... this. Adjust.
8153 (struct process_info): Rename to ...
8154 (struct lwp_info): ... this.
8155 (all_processes): Rename to ...
8156 (all_lwps): ... this.
8157 * proc-service.c (ps_lgetregs): Adjust.
8158 * thread-db.c (thread_db_create_event, find_one_thread)
8159 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8160
0b16c5cf
PA
81612009-03-14 Pedro Alves <pedro@codesourcery.com>
8162
8163 * server.c (handle_query): Handle "qAttached".
8164
32de4b9d
NS
81652009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8166
8167 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8168 GPLv3, update license URL.
8169
2aecd87f
DE
81702009-03-01 Doug Evans <dje@google.com>
8171
93efd302 8172 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8173 (server_h): Add gdb_signals.h.
8174 (signals.o): Update.
8175 * server.h (target_signal_from_host,target_signal_to_host_p)
8176 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8177
86b1f9c5
PM
81782009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8179
8180 * remote-utils.c (getpkt): Also generate remote-debug
8181 information if noack_mode is set.
8182
4aa995e1
PA
81832009-02-06 Pedro Alves <pedro@codesourcery.com>
8184
8185 * server.c (handle_query): Report qXfer:siginfo:read and
8186 qXfer:siginfo:write as supported and handle them.
8187 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8188 * linux-low.c (linux_xfer_siginfo): New.
8189 (linux_target_ops): Set it.
8190
62709adf
PA
81912009-01-26 Pedro Alves <pedro@codesourcery.com>
8192
8193 * server.c (gdbserver_usage): Mention --remote-debug.
8194 (main): Accept '--remote-debug' switch.
8195
aef93bd7
DE
81962009-01-18 Doug Evans <dje@google.com>
8197
8198 * regcache.c (new_register_cache): No need to check result of xcalloc.
8199 * server.c (handle_search_memory): Back out calls to xmalloc,
8200 result is checked and error is returned to user upon failure.
8201 (handle_query): Ditto. Add more checks for result of malloc.
8202 (handle_v_cont): Check result of malloc, report error back to
8203 user upon failure.
8204 (handle_v_run): Ditto. Call freeargv.
8205 * server.h (freeargv): Declare.
8206 * utils.c (freeargv): New fn.
8207
54363045
DE
82082009-01-15 Doug Evans <dje@google.com>
8209
f626972c
DE
8210 * gdbreplay.c (perror_with_name): Make arg const char *.
8211 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8212 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8213 * utils.c (perror_with_name): Make arg const char *.
54363045 8214
18aae699
PA
82152009-01-14 Pedro Alves <pedro@codesourcery.com>
8216
8217 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8218 when handling a EXIT_PROCESS_DEBUG_EVENT.
8219
ff703abe
JB
82202009-01-06 Joel Brobecker <brobecker@adacore.com>
8221
8222 * gdbreplay.c (gdbreplay_version): Update copyright year.
8223 * server.c (gdbserver_version): Likewise.
8224
f21cc1a2 82252009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8226
8227 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8228 (handle_extended_wait): Improve comment.
0e21c1ec 8229
bca929d3
DE
82302008-12-13 Doug Evans <dje@google.com>
8231
8232 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8233 * server.h (ATTR_MALLOC): New macro.
8234 (xmalloc,xcalloc,xstrdup): Declare.
8235 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8236 * inferiors.c: Ditto.
8237 * linux-low.c: Ditto.
8238 * mem-break.c: Ditto.
8239 * regcache.c: Ditto.
8240 * remote-utils.c: Ditto.
8241 * server.c: Ditto.
8242 * target.c: Ditto.
8243 * win32-low.c: Ditto.
8244
97438e3f
DE
82452008-12-12 Doug Evans <dje@google.com>
8246
896c7fbb
DE
8247 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8248 in debugging printf.
8249
97438e3f
DE
8250 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8251
e3b886f8
DE
82522008-12-09 Doug Evans <dje@google.com>
8253
8254 * linux-low.h (struct process_info): Delete member tid, unused.
8255 * thread-db.c (find_one_thread): Update.
8256 (maybe_attach_thread): Update.
8257
07e059b5
VP
82582008-12-02 Pedro Alves <pedro@codesourcery.com>
8259
889bf7c5
PA
8260 * target.h (struct target_ops): Add qxfer_osdata member.
8261 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8262 and dirent.h.
8263 (linux_qxfer_osdata): New functions.
8264 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8265 callback.
8266 * server.c (handle_query): Handle "qXfer:osdata:read:".
8267 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8268 (buffer_xml_printf): New functions.
8269 * server.h (struct buffer): New.
8270 (buffer_grow_str, buffer_grow_str0): New macros.
8271 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8272 (buffer_xml_printf): Declare.
07e059b5 8273
4cab47ab
DE
82742008-11-24 Doug Evans <dje@google.com>
8275
8276 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8277
f142445f
DJ
82782008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8279
8280 * server.c (handle_v_run): Always use the supplied argument list.
8281
d0107bb6 82822008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8283
d0107bb6
BW
8284 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8285 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8286
2c4ad781
TJB
82872008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8288
8289 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8290 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8291 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8292 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8293 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8294 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8295 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8296 XML target descriptions.
8297 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8298 when inferior is running on an ISA 2.05 or later processor. Add
8299 special case to return offset for full 64-bit slot of FPSCR when
8300 in 32-bits.
8301
dfb64f85
DJ
83022008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8303
8304 * Makefile.in (SFILES, clean): Added sparc64 files.
8305 (reg-sparc64.o, reg-sparc64.c): New.
8306 * configure.srv (sparc*-*-linux*): New configuration.
8307 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8308 syscall arguments for SPARC.
8309 (regsets_store_inferior_registers): Likewise.
8310 * linux-sparc-low.c: New file.
8311
66b6e1dd
DE
83122008-10-21 Doug Evans <dje@google.com>
8313
8314 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8315 (READLINE_DIR,READLINE_DEP): Delete.
8316 (INTERNAL_CFLAGS): Update.
8317 (LINTFLAGS): Update.
8318
9b710a42
PA
83192008-10-10 Pedro Alves <pedro@codesourcery.com>
8320
8321 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8322 whole argv from the last run, not just argv[0].
8323
5822d809
PA
83242008-09-08 Pedro Alves <pedro@codesourcery.com>
8325
8326 * regcache.c (new_register_cache): Return NULL if the register
8327 cache size isn't known yet.
8328 (free_register_cache): Avoid dereferencing a NULL regcache.
8329
74aac56f
DJ
83302008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8331
8332 * configure.srv: Merge MIPS and MIPS64.
8333
400b20f5
MR
83342008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8335
8336 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8337
677c5bb1
LM
83382008-08-18 Luis Machado <luisgpm@br.ibm.com>
8339
8340 * Makefile.in: Add required vsx dependencies.
8341
8342 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8343 Declare init_registers_powerpc_vsx32l.
8344 Declare init_registers_powerpc_vsx64l.
8345 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8346 (ppc_arch_setup): Check for VSX in hwcap.
8347 (ppc_fill_vsxregset): New function.
8348 (ppc_store_vsxregset): New function.
8349 Add new VSX entry in regset_info target_regsets.
8350
8351 * configure.srv: Add new VSX dependencies.
8352
a6f3e723
SL
83532008-08-12 Pedro Alves <pedro@codesourcery.com>
8354
8355 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8356 (remote_open): Set or clear transport_is_reliable.
8357 (putpkt_binary): Don't expect acks in noack mode.
8358 (getpkt): Don't send ack/nac in noack mode.
8359 * server.c (handle_general_set): Handle QStartNoAckMode.
8360 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8361 qSupported.
8362 (main): Reset noack_mode on every connection.
8363 * server.h (noack_mode): Declare.
8364
a417dc56
RW
83652008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8366
8367 * Makefile.in (GDBREPLAY_OBS): New variable.
8368 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8369
3221518c
UW
83702008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8371 Daniel Jacobowitz <dan@codesourcery.com>
8372
8373 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8374 (usr_store_inferior_registers): Likewise.
8375 (regsets_store_inferior_registers): Likewise.
8376
ec56be1b
PA
83772008-07-31 Rolf Jansen <rj@surtec.com>
8378 Pedro Alves <pedro@codesourcery.com>
8379
8380 * configure.ac: Check for memmem declaration.
8381 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8382 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8383 (disable_packet_qfThreadInfo): Unconditionally compile.
8384 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8385 * configure, config.in: Regenerate.
8386
2fe5e3ff
DE
83872008-07-28 Doug Kwan <dougkwan@google.com>
8388
8389 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8390 (linux_write_memory): Remove declaration of errno.
8391
836acd6d
UW
83922008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8393
8394 * linux-low.c (handle_extended_wait): Do not use "status"
8395 variable uninitialized.
8396
aeba519e
PA
83972008-07-07 Pedro Alves <pedro@codesourcery.com>
8398
8399 * server.c (handle_v_attach): Inhibit reporting dll changes.
8400
db42f210
PA
84012008-06-27 Pedro Alves <pedro@codesourcery.com>
8402
8403 * remote-utils.c (prepare_resume_reply): If requested, don't
8404 output "thread:TID" in the T stop reply.
8405
8406 * server.c (disable_packet_vCont, disable_packet_Tthread)
8407 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8408 (handle_query): If requested, disable support for qC, qfThreadInfo
8409 and qsThreadInfo.
8410 (handle_v_requests): If requested, disable support for vCont.
8411 (gdbserver_show_disableable): New.
8412 (main): Handle --disable-packet and --disable-packet=LIST.
8413
8414 * server.h (disable_packet_vCont, disable_packet_Tthread)
8415 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8416
8e4c5421
CD
84172008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8418
8419 * server.c (gdbserver_usage): Mention --version.
8420
6e23a804
DJ
84212008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8422
8423 * Makefile.in (gdbreplay.o): New rule.
8424
90aa6a40
JM
84252008-06-06 Joseph Myers <joseph@codesourcery.com>
8426
8427 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8428 message, not gdbserver.
8429
c16158bc 84302008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8431 Nathan Sidwell <nathan@codesourcery.com>
8432 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8433
8434 * acinclude.m4: Include ../../config/acx.m4.
8435 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8436 * configure, config.in: Regenerate.
8437 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8438 * server.c (gdbserver_version): Print PKGVERSION.
8439 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8440 (main): Adjust gdbserver_usage calls.
8441 * gdbreplay.c (version, host_name): Add declarations.
8442 (gdbreplay_version, gdbreplay_usage): New.
8443 (main): Accept --version and --help options.
8444
aeb75bf5
DJ
84452008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8446
8447 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8448 (arm_breakpoint_at): Handle Thumb.
8449 (the_low_target): Add comment.
8450
76b233dd
UW
84512008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8452
8453 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8454
08388c79
DE
84552008-05-09 Doug Evans <dje@google.com>
8456
a3c83fae
DE
8457 * server.h (decode_search_memory_packet): Declare.
8458 * remote-utils.c (decode_search_memory_packet): New fn.
8459 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8460 (handle_search_memory): New fn.
8461 (handle_query): Process qSearch:memory packets.
8462
bb9c3d36
UW
84632008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8464
8465 * regcache.c (registers_length): Remove.
8466 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8467 full register packet.
8468 * regcache.h (registers_length): Remove prototype.
8469 * server.h (PBUFSIZ): Define to 16384.
8470
7284e1be
UW
84712008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8472
8473 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8474 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8475 powerpc-64l.o, and powerpc-altivec64l.o.
8476 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8477 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8478 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8479 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8480 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8481 to srv_xmlfiles.
8482
8483 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8484 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8485 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8486 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8487 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8488 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8489 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8490 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8491 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8492 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8493 (clean): Update.
8494
8495 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8496 (init_registers_powerpc_32l): ... this new prototype.
8497 (init_registers_powerpc_32): Remove, replace by ...
8498 (init_registers_powerpc_altivec32l): ... this new prototype.
8499 (init_registers_powerpc_e500): Remove, replace by ...
8500 (init_registers_powerpc_e500l): ... this new prototype.
8501 (init_registers_ppc64): Remove, replace by ...
8502 (init_registers_powerpc_64l): ... this new prototype.
8503 (init_registers_powerpc_64): Remove, replace by ...
8504 (init_registers_powerpc_altivec64l): ... this new prototype.
8505 (ppc_num_regs): Set to 73.
8506 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8507 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8508 (ppc_cannot_store_register): Handle orig_r3 and trap.
8509 (ppc_arch_setup): Update init_registers_... calls.
8510 (ppc_fill_gregset): Handle orig_r3 and trap.
8511
8512 * inferiors.c (clear_inferiors): Reset current_inferior.
8513
fdc59709
PB
85142008-04-23 Paolo Bonzini <bonzini@gnu.org>
8515
889bf7c5
PA
8516 * acinclude.m4: Add override.m4.
8517 * configure: Regenerate.
fdc59709 8518
c9b2f845
UW
85192008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8520
8521 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8522 initial call to init_register_ppc64.
8523
550512b8
UW
85242008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8525
43aaf8b6
PA
8526 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8527 single powerpc*-*-linux* case.
550512b8
UW
8528 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8529
b6430ec3
UW
85302008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8531
8532 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8533 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8534 from reg_xmlfiles.
8535 * linux-ppc-low.c: Include <elf.h>.
8536 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8537 (ppc_hwcap): New global variable.
8538 (ppc_regmap): Remove __SPE__ #ifdef sections.
8539 (ppc_regmap_e500): New global variable.
8540 (ppc_cannot_store_register): Update __SPE__ special case.
8541 (ppc_get_hwcap): New function.
8542 (ppc_arch_setup): Use it to determine whether inferior supports
8543 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8544 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8545 Do not access registers if target does not support AltiVec.
8546 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8547 Do not access registers if target does not support SPE.
8548 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8549
52fa2412
UW
85502008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8551
8552 * linux-low.c (disabled_regsets, num_regsets): New.
8553 (use_regsets_p): Delete.
8554 (linux_wait_for_process): Clear disabled_regsets.
8555 (regsets_fetch_inferior_registers): Check and set it.
8556 (regsets_store_inferior_registers): Likewise.
8557 (linux_fetch_registers, linux_store_registers): Do not use
8558 use_regsets_p.
8559 (initialize_low): Allocate disabled_regsets.
8560
e28b3332
DJ
85612008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8562
8563 * Makefile.in (LIBOBJS): New.
8564 (OBS): Use LIBOBJS.
8565 (memmem.o): New rule.
8566 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8567 * configure: Regenerated.
8568
4536995d
UW
85692008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8570
8571 * server.c (handle_query): Never return "unsupported" for
8572 qXfer:features:read queries.
8573
221c031f
UW
85742008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8575
8576 * server.c (get_features_xml): Fix inverted condition.
8577 (handle_query): Always support qXfer:feature:read.
8578
ccd213ac
DJ
85792008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8580
8581 * server.c (wrapper_argv): New.
8582 (start_inferior): Handle wrapper_argv. If set, expect an extra
8583 trap.
8584 (gdbserver_usage): Document --wrapper.
8585 (main): Parse --wrapper.
8586
6fe305f7
UW
85872008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8588
8589 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8590 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8591 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8592 (ppc_set_pc): Likewise.
8593 (ppc_arch_setup): New function.
8594 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8595 of collect_register.
889bf7c5 8596 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8597
5b0a002e
UW
85982008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8599
8600 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8601 instead of linux-ppc64-low.o.
8602 * linux-ppc64-low.c: Remove file.
8603 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8604 (linux-ppc64-low.o): Remove rule.
8605
8606 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8607 (init_registers_powerpc_64): Likewise.
8608 (ppc_regmap): Conditionally define depending on __powerpc64__.
8609 (ppc_cannot_store_register): Do not special-case "fpscr" when
8610 compiled on __powerpc64__.
8611 (ppc_collect_ptrace_register): New function.
8612 (ppc_supply_ptrace_register): New function.
8613 (ppc_breakpoint): Change type to "unsigned int".
8614 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8615 (the_low_target): Conditionally provide initializers for the
889bf7c5 8616 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8617 collect_ptrace_register and supply_ptrace_register members.
8618
9b4b61c8
UW
86192008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8620
8621 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8622 * server.c (gdbserver_xmltarget): Define.
8623 (get_features_xml): Use it to replace "target.xml" and arch_string.
8624
8625 * configure.srv: Remove srv_xmltarget. Add XML files that were
8626 mentioned there to srv_xmlfiles instead. Remove conditional tests
8627 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8628 srv_xmlfiles and srv_regobj to include all possible choices.
8629 * configure.ac (srv_xmltarget): Remove.
8630 (srv_xmlfiles): Do not add "target.xml".
8631 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8632 checks for supplementary target information.
8633 * configure: Regenerate.
8634 * Makefile.in (XML_TARGET): Remove.
8635 (target.xml): Remove rule.
8636 (clean): Do not clean up target.xml.
8637 (.PRECIOUS): Do not mention target.xml.
8638
8639 * target.h (struct target_ops): Remove arch_string member.
8640 * linux-low.c (linux_arch_string): Remove.
8641 (linux_target_ops): Remove arch_string initializer.
8642 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8643 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8644 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8645 * spu-low.c (spu_arch_string): Remove.
8646 (spu_target_ops): Remove arch_string initializer.
8647 * win32-low.c (win32_arch_string): Remove.
8648 (win32_target_ops): Remove arch_string initializer.
8649 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8650 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8651 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8652
ee1a7ae4
UW
86532008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8654
8655 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8656 by collect_ptrace_register and supply_ptrace_register hooks.
8657 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8658 instead of checking for the_low_target.left_pad_xfer.
8659 (usr_store_inferior_registers): Use collect_ptrace_register callback
8660 instead of checking for the_low_target.left_pad_xfer.
8661
8662 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8663 (s390_supply_ptrace_register): Likewise.
8664 (s390_fill_gregset): Call s390_collect_ptrace_register.
8665 (the_low_target): Update.
8666
8667 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8668 (ppc_supply_ptrace_register): Likewise.
8669 (the_low_target): Update.
8670
8671 * linux-i386-low.c (the_low_target): Update.
8672 * linux-x86-64-low.c (the_low_target): Update.
8673
d61ddec4
UW
86742008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8675
8676 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8677 reg-s390.o and reg-s390x.o.
8678
8679 * linux-low.c (new_inferior): New global variable.
8680 (linux_create_inferior, linux_attach): Set it.
8681 (linux_wait_for_process): Call the_low_target.arch_setup after the
8682 target has stopped for the first time.
8683 (initialize_low): Do not call the_low_target.arch_setup.
8684
8685 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8686 (s390_set_pc): Likewise.
8687 (s390_arch_setup): New function.
8688 (the_low_target): Use s390_arch_setup as arch_setup routine.
8689
8690 * regcache.c (realloc_register_cache): New function.
8691 (set_register_cache): Call it for each existing regcache.
8692
d05b4ac3
UW
86932008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8694
8695 * server.h (init_registers): Remove prototype.
8696
8697 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8698 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8699 instead of init_registers ().
8700 * linux-arm-low.c (init_registers_arm): Add prototype.
8701 (init_registers_arm_with_iwmmxt): Likewise.
8702 (the_low_target): Add initializer for arch_setup field.
8703 * linux-cris-low.c (init_registers_cris): Add prototype.
8704 (the_low_target): Add initializer for arch_setup field.
8705 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8706 (the_low_target): Add initializer for arch_setup field.
8707 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8708 (the_low_target): Add initializer for arch_setup field.
8709 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8710 (the_low_target): Add initializer for arch_setup field.
8711 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8712 (the_low_target): Add initializer for arch_setup field.
8713 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8714 (the_low_target): Add initializer for arch_setup field.
8715 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8716 (init_registers_mips64_linux): Likewise.
8717 (the_low_target): Add initializer for arch_setup field.
8718 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8719 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8720 (the_low_target): Add initializer for arch_setup field.
8721 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8722 (init_registers_powerpc_64): Likewise.
8723 (the_low_target): Add initializer for arch_setup field.
8724 * linux-s390-low.c (init_registers_s390): Add prototype.
8725 (init_registers_s390x): Likewise.
8726 (the_low_target): Add initializer for arch_setup field.
8727 * linux-sh-low.c (init_registers_sh): Add prototype.
8728 (the_low_target): Add initializer for arch_setup field.
8729 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8730 (the_low_target): Add initializer for arch_setup field.
8731 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8732 (the_low_target): Add initializer for arch_setup field.
8733
8734 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8735 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8736 instead of init_registers ().
8737 * win32-arm-low.c (init_registers_arm): Add prototype.
8738 (the_low_target): Add initializer for arch_setup field.
8739 * win32-i386-low.c (init_registers_i386): Add prototype.
8740 (the_low_target): Add initializer for arch_setup field.
8741
8742 * spu-low.c (init_registers_spu): Add prototype.
8743 (initialize_low): Call initialie_registers_spu () instead of
8744 initialize_registers ().
8745
fd96d250
PA
87462008-02-19 Pedro Alves <pedro@codesourcery.com>
8747
8748 * server.c (handle_v_requests): When handling the vRun and vAttach
8749 packets, if already debugging a process, don't kill it. Return an
8750 error instead.
8751
d41b6bb4
DJ
87522008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8753
8754 * server.c (handle_query): Correct length check.
8755
5ac588cf
PA
87562008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8757
8758 * win32-low.c (do_initial_child_stuff): Add process handle
8759 parameter. Set current_process_handle and current_process_id from the
8760 parameters. Clear globals.
8761 (win32_create_inferior): Don't set current_process_handle and
8762 current_process_id here. Instead pass them on the call to
8763 do_initial_child_stuff.
8764 (win32_attach): Likewise.
8765 (win32_clear_inferiors): New.
8766 (win32_kill): Don't close the current process handle or the
8767 current thread handle here. Instead call win32_clear_inferiors.
8768 (win32_detach): Don't open a new handle to the process. Call
8769 win32_clear_inferiors.
8770 (win32_join): Don't rely on current_process_handle; open a new
8771 handle using the process id.
8772 (win32_wait): Call win32_clear_inferiors when the inferior process
8773 has exited.
8774
ecd7ecbc
DJ
87752008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8776
8777 * server.c (monitor_show_help): Add "exit".
8778
1525d545
MG
87792008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8780
ecd7ecbc 8781 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
8782 (clean): Add reg-xtensa.c.
8783 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
8784 * configure.srv (xtensa*-*-linux*) New target.
8785 * linux-xtensa-low.c: New.
8786 * xtensa-xtregs.c: New.
1525d545 8787
59a016f0
PA
87882008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8789
8790 * hostio.c: Don't include errno.h.
8791 (errno_to_fileio_errno): Move to hostio-errno.
8792 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8793 error number outputting to the target->hostio_last_error callback.
8794 (hostio_packet_error): Use FILEIO_EINVAL directly.
8795 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8796 calls to hostio_error.
8797 * hostio-errno.c: New.
8798 * server.h (hostio_last_error_from_errno): Declare.
8799 * target.h (target_ops): Add hostio_last_error member.
8800 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8801 as hostio_last_error handler.
889bf7c5 8802 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
8803 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8804 (wince_hostio_last_error): New functions.
8805 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8806 as hostio_last_error handler.
8807 (win32_target_ops) [!_WIN32_WCE]: Register
8808 hostio_last_error_from_errno as hostio_last_error handler.
8809 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8810 (hostio-errno.o): New rule.
8811 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8812 * configure.srv (srv_hostio_err_objs): New variable. Default to
8813 hostio-errno.o.
8814 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8815 * configure: Regenerate.
8816
2d717e4f
DJ
88172008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8818
8819 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8820 (linux_kill, linux_detach): Clean up the process list.
8821 * remote-utils.c (remote_open): Improve port number parsing.
8822 (putpkt_binary, input_interrupt): Only send interrupts if the target
8823 is running.
8824 * server.c (extended_protocol): Make static.
8825 (attached): Define earlier.
8826 (exit_requested, response_needed, program_argv): New variables.
8827 (target_running): New.
8828 (start_inferior): Clear attached here.
8829 (attach_inferior): Set attached here.
8830 (require_running): Define.
8831 (handle_query): Use require_running and target_running. Implement
8832 "monitor exit".
8833 (handle_v_attach, handle_v_run): New.
8834 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8835 (gdbserver_usage): Update.
8836 (main): Redo argument parsing. Handle --debug and --multi. Handle
8837 --attach along with other options or after the port. Save
8838 program_argv. Support no initial program. Resynchronize
8839 communication with GDB after an error. Handle "monitor exit".
8840 Use require_running and target_running. Always allow the extended
8841 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8842 restart in extended mode.
8843 * README: Refer to the GDB manual. Update --attach usage.
8844
7407e2de
AS
88452007-12-20 Andreas Schwab <schwab@suse.de>
8846
8847 * linux-low.c (STACK_SIZE): Define.
8848 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8849 (linux_test_for_tracefork): Likewise.
8850
b65d95c5
DJ
88512007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8852
8853 * linux-low.c (linux_wait_for_event): Update messages. Do not
8854 reinsert auto-delete breakpoints.
8855 * mem-break.c (struct breakpoint): Change return type of handler to
8856 int.
8857 (set_breakpoint_at): Update handler type.
8858 (reinsert_breakpoint_handler): Return 1 instead of calling
8859 delete_breakpoint.
8860 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8861 setting a new one.
8862 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8863 * mem-break.h (set_breakpoint_at): Update handler type.
8864 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8865 * win32-low.c (auto_delete_breakpoint): New.
8866 (get_child_debug_event): Use it.
8867
4e799345
DJ
88682007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8869
8870 * configure.ac: Check for pread and pwrite.
8871 * hostio.c (handle_pread): Fall back to lseek and read.
8872 (handle_pwrite): Fall back to lseek and write.
8873 * config.in, configure: Regenerated.
8874
27524b67
DJ
88752007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8876
8877 * server.c (myresume): Add own_buf argument.
8878 (main): Update calls.
8879
a20d5e98
DJ
88802007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8881
8882 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8883 * remote-utils.c (remote_open): Do not call disable_async_io.
8884 (block_async_io): Delete.
8885 (unblock_async_io): Make static.
8886 (initialize_async_io): New.
8887 * server.c (handle_v_cont): Handle async I/O here.
8888 (myresume): Likewise. Move other common resume tasks here...
8889 (main): ... from here. Call initialize_async_io. Disable async
8890 I/O before the main loop.
8891 * server.h (initialize_async_io): Declare.
8892 (block_async_io, unblock_async_io): Delete prototypes.
8893 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8894
b79d787e
DJ
88952007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8896
8897 * remote-utils.c (readchar): Allow binary data in received messages.
8898
d97903b2
PA
88992007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8900
8901 * win32-low.c (attaching): New global.
8902 (win32_create_inferior): Clear the `attaching' global.
8903 (win32_attach): Set the `attaching' global.
8904 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8905 attaching. Only set a breakpoint at the entry point if not
8906 attaching.
8907
311de423
PA
89082007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8909
8910 * server.c (main): Don't report dll events on the initial
8911 connection on attaches.
8912
6c2d16d2
PA
89132007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8914
8915 * server.c (main): Relax numerical bases supported for the pid of
8916 the --attach command line argument.
8917
5ca906e6
PA
89182007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8919
8920 * win32-low.c (win32_attach): Call OpenProcess before
8921 DebugActiveProcess, not after. Add last error output to error
8922 call.
8923
9c6c8194
PA
89242007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8925
8926 * win32-low.c (win32_get_thread_context)
8927 (win32_set_thread_context): New functions.
8928 (thread_rec): Use win32_get_thread_context.
8929 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8930 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8931 field.
8932
4d5d1aaa
PA
89332007-12-03 Leo Zayas
8934 Pedro Alves <pedro_alves@portugalmail.pt>
8935
8936 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8937 global variables.
8938 (child_add_thread): Minor cleanup.
8939 (child_continue): Resume artificially suspended threads before
8940 calling ContinueDebugEvent.
8941 (suspend_one_thread): New.
8942 (fake_breakpoint_event): New.
8943 (get_child_debug_event): Change return type to int. Check here if
8944 gdb sent an interrupt request. If a soft interrupt was requested,
8945 fake a breakpoint event. Return 0 if there is no event to handle,
8946 and 1 otherwise.
8947 (win32_wait): Don't check here if gdb sent an interrupt request.
8948 Ensure there is a valid event to handle.
8949 (win32_request_interrupt): Add soft interruption method as last
8950 resort.
8951
c436e841
PA
89522007-12-03 Leo Zayas
8953 Pedro Alves <pedro_alves@portugalmail.pt>
8954
8955 * win32-low.h (win32_thread_info): Add descriptions to the
8956 structure members. Replace `suspend_count' counter by a
8957 `suspended' flag.
8958 * win32-low.c (thread_rec): Update condition of when to get the
8959 context from the inferior. Rely on ContextFlags being set if it
8960 has already been retrieved. Only suspend the inferior thread if
8961 we haven't already. Warn if that fails.
8962 (continue_one_thread): s/suspend_count/suspended/. Only call
8963 ResumeThread once. Warn if that fails.
8964
e7b5fa67
PA
89652007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8966
8967 * win32-low.c (win32_wait): Don't read from the inferior when it
8968 has already exited.
8969
a385171d
PA
89702007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8971
8972 * Makefile.in (win32_low_h): New variable.
8973 (win32-low.o): Add dependency on $(win32_low_h).
8974 (win32-arm-low.o, win32-i386-low.o): New rules.
8975
f80c84b3
DJ
89762007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8977
8978 * hostio.c: Correct copyright year.
8979
a6b151f1
DJ
89802007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8981
8982 * Makefile.in (OBS): Add hostio.o.
8983 (hostio.o): New rule.
8984 * server.h (handle_vFile): Declare.
8985 * hostio.c: New file.
8986 * server.c (handle_v_requests): Take packet_len and new_packet_len
8987 for binary packets. Call handle_vFile.
8988 (main): Update call to handle_v_requests.
8989
f9387fc3
DJ
89902007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8991
8992 * linux-low.c: Include <sched.h>.
8993
51c2684e
DJ
89942007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8995
8996 * linux-low.c (linux_tracefork_grandchild): New.
8997 (linux_tracefork_child): Use clone.
8998 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8999
75f83163
JB
90002007-10-31 Joel Brobecker <brobecker@adacore.com>
9001
9002 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9003
da5898ce
DJ
90042007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9005
9006 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9007
24a09b5f
DJ
90082007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9009
9010 * inferiors.c (change_inferior_id): Delete.
9011 (add_pid_to_list, pull_pid_from_list): New.
9012 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9013 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9014 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9015 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9016 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9017 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9018 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9019 (using_threads): Always set to 1.
9020 (handle_extended_wait): New.
9021 (add_process): Do not set TID.
9022 (linux_create_inferior): Set must_set_ptrace_flags.
9023 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9024 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9025 (linux_thread_alive): Rename TID argument to LWPID.
9026 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9027 (linux_wait_for_event): Do not use TID or check using_threads. Update
9028 call to dead_thread_notify. Call handle_extended_wait.
9029 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9030 (send_sigstop): Delete sigstop_sent.
9031 (wait_for_sigstop): Avoid TID.
9032 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9033 (linux_test_for_tracefork): New.
9034 (linux_lookup_signals): Use thread_db_active and
9035 linux_supports_tracefork_flag.
9036 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9037 * linux-low.h (get_process_thread): Avoid TID.
9038 (struct process_ifo): Move thread_known and tid to the end. Remove
9039 sigstop_sent.
9040 (linux_attach_lwp, thread_db_init): Update prototypes.
9041 * server.h (change_inferior_id): Delete prototype.
9042 (add_pid_to_list, pull_pid_from_list): New prototypes.
9043 * thread-db.c (thread_db_use_events): New.
9044 (find_first_thread): Rename to...
9045 (find_one_thread): ...this. Update callers and messages. Do not
9046 call fatal. Check thread_db_use_events. Do not call
9047 change_inferior_id or new_thread_notify.
9048 (maybe_attach_thread): Update. Do not call new_thread_notify.
9049 (thread_db_init): Set thread_db_use_events. Check use_events.
9050 * utils.c (fatal, warning): Correct message prefix.
9051
30ed0a8f
DJ
90522007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9053
9054 * Makefile.in (clean): Remove new files.
9055 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9056 (powerpc-64.o, powerpc-64.c): New rules.
9057 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9058 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9059 with SPE.
9060 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9061 SPE targets.
9062 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9063 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9064 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9065 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9066 (target_regsets): Add AltiVec and SPE register sets.
9067 * configure.ac: Check for AltiVec and SPE.
9068 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9069 (ppc_fill_vrregset, ppc_store_vrregset): New.
9070 (target_regsets): Add AltiVec register set.
9071 * configure: Regenerated.
9072
fd462a61
DJ
90732007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9074
9075 * linux-low.c (O_LARGEFILE): Define.
9076 (linux_read_memory): Use /proc/PID/mem.
9077 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9078 * configure, config.in: Regenerated.
9079
69f223ed
DJ
90802007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9081
9082 * linux-low.c (linux_wait_for_event): Do not pass signals while
9083 single-stepping.
9084
aec18585
PA
90852007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9086
9087 * win32-low.c (create_process): New.
9088 (win32_create_inferior): Use create_process instead of
9089 CreateProcess. If create_process failed retry appending an ".exe"
9090 suffix. Store the GetLastError result immediatelly after
9091 create_process calls and use it on the call to error.
9092
34d86ddd
PA
90932007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9094
9095 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9096
5a0e3bd0
JB
90972007-08-23 Joel Brobecker <brobecker@adacore.com>
9098
9099 * configure.ac: Switch license to GPLv3.
9100
f88c79e6
MS
91012007-08-01 Michael Snyder <msnyder@access-company.com>
9102
9103 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9104
6b3d9b83
PA
91052007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9106
9107 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9108 typedef.
9109 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9110 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9111 CloseToolhelp32Snapshot.
9112 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9113 CloseToolhelp32Snapshot.
9114
c588c53c
MS
91152007-07-27 Michael Snyder <michael.snyder@access-company.com>
9116
9117 * server.c (main): Check for inferior exit before main loop.
9118
aa0403d9
PA
91192007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9120
9121 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9122 instead of on tmp_desc.
9123
255e7678
DJ
91242007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9125 Daniel Jacobowitz <dan@codesourcery.com>
9126
9127 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9128 (add_thread): Minor cleanups.
9129 (clear_inferiors): Move lower in the file. Clear the DLL
9130 list.
9131 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9132 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9133 (xml_escape_text): New.
9134 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9135 for qSupported.
9136 (handle_v_cont): Report errors.
9137 (gdbserver_version): Update.
9138 (main): Correct size of own_buf. Do not report initial DLL events.
9139 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9140 (unloaded_dll, xml_escape_text): New.
9141 * win32-low.c (enum target_waitkind): Update comments.
9142 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9143 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9144 (win32_EnumProcessModules, win32_GetModuleInformation)
9145 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9146 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9147 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9148 (win32_Module32First, win32_Module32Next, load_toolhelp)
9149 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9150 (get_child_debug_event): Handle DLL events.
9151 (win32_wait): Likewise.
9152
0d37add9
DJ
91532007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9154
9155 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9156 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9157
45e2715e
PA
91582007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9159
9160 * win32-low.c (handle_output_debug_string): Ignore event if not
9161 waiting.
9162
c5674cf1
PA
91632007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9164
9165 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9166
2bbe3cc1
DJ
91672007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9168
9169 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9170
ae13219e
DJ
91712007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9172
9173 * inferiors.c (change_inferior_id): Add comment.
9174 * linux-low.c (check_removed_breakpoint): Add an early
9175 prototype. Improve debug output.
9176 (linux_attach): Doc update.
9177 (linux_detach_one_process, linux_detach): Clean up before releasing
9178 each process.
9179 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9180 * linux-low.h (struct process_info): Doc improvement.
9181 * mem-break.c (delete_all_breakpoints): New.
9182 * mem-break.h (delete_all_breakpoints): New prototype.
9183 * thread-db.c (find_first_thread): New.
9184 (thread_db_create_event): Call it instead of
9185 thread_db_find_new_threads. Clean up unused variables.
9186 (maybe_attach_thread): Remove first thread handling.
9187 (thread_db_find_new_threads): Use find_first_thread.
9188 (thread_db_get_tls_address): Likewise.
9189
4105de34
DJ
91902007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9191
9192 * thread-db.c (thread_db_find_new_threads): Add prototype.
9193 (thread_db_create_event): Check for the main thread before adding
9194 a new thread.
9195 (maybe_attach_thread): Only enable event reporting if TID == 0.
9196 (thread_db_get_tls_address): Check for new threads.
9197
2b876972
DJ
91982007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9199
9200 * linux-low.c (linux_create_inferior): Try execv before execvp.
9201 * spu-low.c (spu_create_inferior): Likewise.
9202
7a245884
DJ
92032007-06-13 Mike Frysinger <vapier@gentoo.org>
9204
9205 * linux-low.c (linux_create_inferior): Change execv to execvp.
9206 * spu-low.c (spu_create_inferior): Likewies.
9207
117ce543
DJ
92082007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9209
9210 * Makefile.in (clean): Clean new files instead of deleted ones.
9211 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9212 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9213 rules.
9214 * configure.srv: Specify XML files and new regformats for MIPS and
9215 MIPS64 GNU/Linux.
9216 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9217 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9218 an entry for the restart register.
9219 (mips_cannot_fetch_register, mips_cannot_store_register)
9220 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9221 register names to match the XML descriptions.
9222 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9223 restart register instead of $0.
9224
0e7f50da
UW
92252007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9226 Markus Deuling <deuling@de.ibm.com>
9227
9228 * remote-utils.c (decode_xfer_write): New function.
9229 * server.h (decode_xfer_write): Add prototype.
9230 * server.c (handle_query): Add PACKET_LEN argument. Support
9231 qXfer:spu:read and qXfer:spu:write packets.
9232 (main): Pass packet_len to handle_query.
9233 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9234 * target.h (target_ops): Add qxfer_spu.
9235
374c1d38
UW
92362007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9237
9238 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9239 accessing non-seekable spufs files.
9240
bb63802a
UW
92412007-05-16 Markus Deuling <deuling@de.ibm.com>
9242
889bf7c5 9243 * server.c (handle_query): Add reply for qC packet.
bb63802a 9244
7390519e
PA
92452007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9246 Leo Zayas <lerele@champenstudios@com>
9247
9248 * server.h (check_remote_input_interrupt_request): New function.
9249 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9250 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9251 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9252 (check_remote_input_interrupt_request): New function.
9253 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9254 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9255 winapi_GenerateConsoleCtrlEvent): New typedefs.
9256 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9257 to 250 ms.
9258 (win32_wait): Check for remote interrupt request
9259 with check_remote_input_interrupt_request.
9260 (win32_request_interrupt): New function.
9261 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9262
34b34921
PA
92632007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9264
9265 * win32-low.c (debug_registers_changed,
9266 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9267 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9268 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9269 (thread_rec): Get context using the low target.
9270 (child_add_thread): Call thread_added on the low target,
9271 which does the same thing.
9272 (regptr): Delete.
9273 (do_initial_child_stuff): Remove debug registers references.
9274 Set context using the low target. Resume threads after
9275 setting the contexts.
9276 (child_continue): Remove dead variable. Remove debug
9277 registers references.
9278 (child_fetch_inferior_registers): Go through the low target.
9279 (do_child_store_inferior_registers): Remove.
9280 (child_store_inferior_registers): Go through the low target.
9281 (win32_resume): Remove debug registers references.
9282 Set context using the low target.
9283 (handle_exception): Change return type to void. Don't record
9284 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9285 first chance exception.
889bf7c5 9286 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9287 goto loop. Always return after waiting for debug event.
9288 (win32_wait): Convert to switch statement. Handle spurious
9289 events.
9290
9291 * win32-i386-low.c (debug_registers_changed,
9292 debug_registers_used): New.
9293 (initial_stuff): Rename to ...
9294 (i386_initial_stuff): ... this. Clear debug registers
9295 state variables.
9296 (store_debug_registers): Delete.
9297 (i386_get_thread_context): New.
9298 (load_debug_registers): Delete.
9299 (i386_set_thread_context): New.
9300 (i386_thread_added): New.
9301 (single_step): Rename to ...
9302 (i386_single_step): ... this.
9303 (do_fetch_inferior_registers): Rename to ...
9304 (i386_fetch_inferior_register): ... this.
9305 (i386_store_inferior_register): New.
9306 (the_low_target): Adapt to new interface.
9307
9308 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9309 (arm_get_thread_context): New.
9310 (arm_set_thread_context): New.
9311 (regptr): New.
9312 (do_fetch_inferior_registers): Rename to ...
9313 (arm_fetch_inferior_register): ... this.
9314 (arm_store_inferior_register): New.
9315 (arm_wince_breakpoint): Reimplement as unsigned long.
9316 (arm_wince_breakpoint_len): Define.
9317 (the_low_target): Adapt to new interface.
9318
9319 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9320 load_debug_registers. Add get_thread_context, set_thread_context,
9321 thread_added and store_inferior_register. Rename
9322 fetch_inferior_registers to fetch_inferior_register.
9323 (regptr): Remove declaration.
9324
dd6953e1
PA
93252007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9326
9327 * linux-low.c (linux_detach): Change return type to int. Return 0.
9328 * spu-low.c (spu_detach): Likewise.
9329
444d6139
PA
93302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9331
9332 * target.h (target_ops): Change return type of detach to int.
9333 Add join.
9334 (join_inferior): New.
9335 * server.c (main): Don't skip detach support on mingw32.
9336 If the inferior doesn't support detaching return error.
9337 Call join_inferior instead of using waitpid.
9338 * linux-low.c (linux_join): New.
9339 (linux_target_op): Add linux_join.
9340 * spu-low.c (spu_join): New.
9341 (spu_target_ops): Add spu_join.
9342 * win32-low.c (win32_detach): Adapt to new interface.
9343 Reopen current_process_handle before detaching. Issue a child
9344 resume before detaching.
9345 (win32_join): New.
9346 (win32_target_op): Add win32_join.
9347
1d5315fe
PA
93482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9349
9350 * win32-low.c (win32-attach): Fix return value.
9351 * target.h (target_ops): Describe ATTACH return values.
9352
bf914831
PA
93532007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9354
9355 * win32-low.c (GETPROCADDRESS): Define.
9356 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9357 (winapi_DebugSetProcessKillOnExit): Likewise.
9358 (win32_create_inferior): Force usage of ansi CreateProcessA.
9359 (win32_attach): Use GETPROCADDRESS.
9360 (win32_detach): Likewise.
9361
f72f3e60
PA
93622007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9363
9364 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9365
ed50f18f
PA
93662007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9367
9368 * win32-low.c: Commit leftover changes from 2007-03-29.
9369
0c2ead7e
DJ
93702007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9371
9372 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9373 fields short instead of int. Add explicit padding.
9374 (i387_cache_to_fsave): Remove unnecessary casts.
9375 (i387_fsave_to_cache): Doc fix.
9376 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9377
73725ff3
DJ
93782007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9379
9380 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9381 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9382
d99f33d8
PA
93832007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9384
9385 * configure.srv (arm*-*-mingw32ce*): Move near the other
9386 arm targets.
9387
68070c10
PA
93882007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9389
2482afc6 9390 * configure.ac: Add errno checking.
68070c10
PA
9391 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9392 sys/file.h and malloc.h.
9393 (AC_CHECK_DECLS): Add perror.
9394 (srv_mingwce): Handle.
2482afc6 9395 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9396 win32-i386-low.o to srv_tgtobj.
9397 (i[34567]86-*-mingw*): Likewise.
9398 (arm*-*-mingw32ce*): Add case.
9399 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9400 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9401 [__MINGW32CE__] (strerror): New function.
9402 [__MINGW32CE__] (errno): Define to GetLastError.
9403 [__MINGW32CE__] (COUNTOF): New macro.
9404 (remote_open): Remove extra close call.
9405 * mem-break.c (delete_breakpoint_at): New function.
9406 * mem-break.h (delete_breakpoint_at): Declare.
9407 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9408 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9409 [USE_WIN32API] (read, write): Add char* casts.
9410 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9411 * server.h: Include wincecompat.h on Windows CE.
9412 [HAVE_ERRNO_H]: Check.
9413 (perror): Declare if not declared.
9414 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9415 (perror_with_name): Remove errno declaration.
9416 * wincecompat.h: New.
9417 * wincecompat.c: New.
9418 * win32-low.h: New.
9419 * win32-arm-low.c: New.
9420 * win32-i386-low.c: New.
9421 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9422 (OUTMSG2): Make it safe.
9423 (_T): New macro.
9424 (COUNTOF): New macro.
9425 (NUM_REGS): Get it from the low target.
9426 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9427 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9428 (thread_rec): Let low target handle debug registers.
9429 (child_add_thread): Likewise.
9430 (child_init_thread_list): Likewise.
9431 (continue_one_thread): Likewise.
9432 (regptr): New.
9433 (do_child_fetch_inferior_registers): Move to ...
9434 * win32-i386-low.c: ... here, and rename to ...
9435 (do_fetch_inferior_registers): ... this.
889bf7c5 9436 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9437 Go through the low target.
9438 (do_child_store_inferior_registers): Use regptr.
9439 (strwinerror): New function.
9440 (win32_create_inferior): Handle Windows CE.
9441 Use strwinerror instead of strerror on Windows error
9442 codes. Add program to the error output.
9443 Don't close the main thread handle on Windows CE.
9444 (win32_attach): Use coredll.dll on Windows CE.
9445 (win32_kill): Close current process and current
9446 thread handles.
9447 (win32_detach): Use coredll.dll on Windows CE.
9448 (win32_resume): Let low target handle debug registers, and
9449 step request.
9450 (handle_exception): Add/Remove initial breakpoint. Avoid
9451 non-existant WSTOPSIG on Windows CE.
9452 (win32_read_inferior_memory): Cast to remove warning.
9453 (win32_arch_string): Go through the low target.
9454 (initialize_low): Call set_breakpoint_data with the low
9455 target's breakpoint.
9456 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9457 FOP_REGNUM, mappings): Move to ...
9458 * win32-i386-low.c: ... here.
9459 * win32-low.c (win32_thread_info): Move to ...
9460 * win32-low.h: ... here.
9461 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9462 win32-arm-low.c and wincecompat.c.
9463 (all:): Add $EXEEXT.
9464 (install-only:): Likewise.
9465 (gdbserver:): Likewise.
9466 (gdbreplay:): Likewise.
9467 * config.in: Regenerate.
9468 * configure: Regenerate.
9469
41093d81
PA
94702007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9471
9472 * win32-low.c: Rename typedef thread_info to
9473 win32_thread_info throughout.
9474
544afa54
PA
94752007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9476
9477 * win32-i386-low.c: Rename to ...
9478 * win32-low.c: ... this.
9479 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9480 * Makefile.in: Likewise.
9481
bce7165d
PA
94822007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9483
9484 * remote-utils.c (monitor_output): Constify msg parameter.
9485 * server.h (monitor_output): Likewise.
9486 * win32-i386-low.c (handle_output_debug_string): New.
9487 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9488 handle_output_debug_string.
9489 (get_child_debug_event): Likewise.
9490
506c7aa0
DJ
94912007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9492
9493 * server.c (main): Correct strtoul check.
9494
42c81e2a
DJ
94952007-03-27 Jon Ringle <jon@ringle.org>
9496
9497 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9498
9453113a
DJ
94992007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9500
9501 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9502
64a69107
DJ
95032007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9504
9505 * terminal.h: Check HAVE_SGTTY_H.
9506
95072007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9508
9509 * remote-utils.c (remote_open): Print out the assigned port number.
9510
c74d0ad8
DJ
95112007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9512
9513 * remote-utils.c (monitor_output): New function.
9514 * server.c (debug_threads): Define here.
9515 (monitor_show_help): New function.
9516 (handle_query): Handle qRcmd.
9517 (main): Do not handle 'd' packet.
9518 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9519 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9520 of debug_threads.
9521
de7c3b4a
PA
95222007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9523
9524 * Makefile.in (EXEEXT): New.
9525 (clean): Use $(EXEEXT).
9526
ef57601b
PA
95272007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9528
9529 * target.h (target_ops): Rename send_signal to request_interrupt,
9530 and remove enum target_signal parameter.
9531 * linux-low.c (linux_request_interrupt): Rename from
9532 linux_send_signal, and always send SIGINT.
9533 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9534 and always send SIGINT.
9535 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9536 of send_signal.
9537 (input_interrupt): Likewise.
9538
820f2bda
PA
95392007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9540
9541 * server.c (get_features_xml): Check if target implemented
9542 arch_string.
9543 * win32-i386-low.c (win32_arch_string): New.
9544 (win32_target_ops): Add win32_arch_string as arch_string member.
9545
ab39bf24
UW
95462007-02-22 Markus Deuling <deuling@de.ibm.com>
9547
9548 * spu-low.c (spu_arch_string): New.
9549 (spu_target_ops): Add spu_arch_string.
9550
61ff6e04
DJ
95512007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9552
9553 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9554 * configure.ac: Do not check for terminal.h.
9555 * configure, config.in: Regenerated.
9556
fb1e4ffc
DJ
95572007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9558
9559 * Makefile.in (OBS): Add $(XML_BUILTIN).
9560 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9561 (clean): Update.
9562 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9563 (arm-with-iwmmxt.c): New.
9564 * config.in, configure: Regenerate.
9565 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9566 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9567 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9568 (arm*-*-linux*): Add iWMMXt and regset support.
9569 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9570 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9571 (arm_store_wmmxregset, target_regsets): New.
9572 * server.c (get_features_xml): Take annex argument. Check builtin
9573 XML documents.
9574 (handle_query): Handle multiple annexes.
9575
0f48aa01
DJ
95762007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9577
9578 * remote-utils.c [USE_WIN32API] (read, write): Define.
9579 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9580 write.
9581
23181151
DJ
95822007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9583
9584 * linux-i386-low.c (the_low_target): Set arch_string.
9585 * linux-x86-64-low.c (the_low_target): Likewise.
9586 * linux-low.c (linux_arch_string): New.
9587 (linux_target_ops): Add it.
9588 * linux-low.h (struct linux_target_ops): Add arch_string.
9589 * server.c (write_qxfer_response): Use const void * for DATA.
9590 (get_features_xml): New.
9591 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9592 * target.h (struct target_ops): Add arch_string method.
9593
9d606399
DJ
95942007-01-03 Denis Pilat <denis.pilat@st.com>
9595 Daniel Jacobowitz <dan@codesourcery.com>
9596
9597 * linux-low.c (linux_kill): Handle being called with no threads.
9598 * win32-i386-low.c (win32_kill): Likewise.
9599 (get_child_debug_event): Clear current_process_handle.
9600
96012006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9602 Daniel Jacobowitz <dan@codesourcery.com>
9603
9604 * remote-utils.c (remote_open): Check the type of specified
9605 serial port devices before opening them.
9606 * server.c (main): Kill the inferior if an error occurs during
9607 the first remote_open.
9608
a5e13d24
DJ
96092006-12-05 Markus Deuling <deuling@de.ibm.com>
9610
9611 * README: Update supported targets.
9612
186947f7
DJ
96132006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9614
9615 * Makefile.in (clean): Remove reg-mips64.c.
9616 (reg-mips64.c, reg-mips64.o): New rules.
9617 * configure.srv: Handle mips64. Include regset support for mips.
9618 * linux-mips-low.c (union mips_register): New.
9619 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9620 (mips_breakpoint, mips_breakpoint_at): Use int.
9621 (mips_collect_register, mips_supply_register)
9622 (mips_collect_register_32bit, mips_supply_register_32bit)
9623 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9624 (mips_store_fpregset, target_regsets): New.
9625 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9626
a13e2c95
UW
96272006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9628
9629 * configure.srv: Add target "spu*-*-*".
9630 * Makefile.in (clean): Remove reg-spu.c.
9631 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9632 * spu-low.c: New file.
9633
cb7283db
DJ
96342006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9635
9636 * configure.ac: Correct td_thr_tls_get_addr test.
9637 * configure: Regenerated.
9638
89be2091
DJ
96392006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9640
9641 * linux-low.c (linux_wait_for_event): Reformat. Use the
9642 pass_signals array.
9643 * remote-utils.c (decode_address_to_semicolon): New.
9644 * server.c (pass_signals, handle_general_set): New.
9645 (handle_query): Mention QPassSignals for qSupported.
9646 (main): Call handle_general_set.
9647 * server.h (pass_signals, decode_address_to_semicolon): New.
9648
000ef4f0
DJ
96492006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9650
9651 * server.c (handle_query): Correct error handling for read_auxv.
9652
b7149293
UW
96532005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9654
9655 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9656 and srv_linux_thread_db to yes.
9657 * linux-s390-low.c (s390_fill_gregset): New function.
9658 (target_regsets): Define data structure.
9659
dae5f5cf
DJ
96602006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9661
9662 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9663 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9664 * config.in, configure: Regenerated.
9665 * inferiors.c (gdb_id_to_thread): New function.
9666 (gdb_id_to_thread_id): Use it.
9667 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9668 * linux-low.h (struct process_info): Add th member.
9669 (thread_db_get_tls_address): New prototype.
9670 * remote-utils.c (decode_address): Make non-static.
9671 * server.c (handle_query): Handle qGetTLSAddr.
9672 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9673 * target.h (struct target_ops): Add get_tls_address.
9674 * thread-db.c (maybe_attach_thread): Save the thread handle.
9675 (thread_db_get_tls_address): New.
9676
32ca6d61
DJ
96772006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9678
9679 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9680 (linux_resume_one_process): Take a siginfo_t *. Update all
9681 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9682 (struct pending_signals): Add a siginfo_t.
9683 (linux_wait_for_process): Always set last_status.
9684 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9685 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9686 * linux-low.h (struct process_info): Add last_status.
9687
5ffff7c1
DJ
96882006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9689
9690 * remote-utils.c (try_rle): New function.
9691 (putpkt_binary): Use it.
9692
8695c747
DJ
96932006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9694
9695 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9696 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9697 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9698 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9699 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9700 point registers.
9701
290fadea
RS
97022006-08-08 Richard Sandiford <richard@codesourcery.com>
9703
9704 * server.c (terminal_fd): New variable.
9705 (old_foreground_pgrp): Likewise.
9706 (restore_old_foreground_pgrp): New function.
9707 (start_inferior): Record the terminal file descriptor in terminal_fd
9708 and its original foreground group in old_foreground_pgrp. Register
9709 restore_old_foreground_pgrp with atexit().
9710
9f2e1e63
DJ
97112006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9712
9713 * server.c (handle_query): Correct qPart to qXfer.
9714
b80864fb
DJ
97152006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9716
9717 * configure.ac: Check for more headers which are missing on
9718 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9719 * configure.srv: Add Cygwin and mingw32.
9720 * remote-utils.c: Don't include headers unconditionally which
9721 are missing on mingw32. Include <winsock.h> for mingw32.
9722 (remote_open): Adjust for mingw32 support. Flush
9723 standard error after writing to it.
9724 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9725 (unblock_async_io, enable_async_io, disable_async_io)
9726 (readchar, getpkt): Update for Winsock support.
9727 (prepare_resume_reply): Expect a protocol signal number.
9728 * server.c: Disable <sys/wait.h> on mingw32.
9729 (start_inferior): Adjust for mingw32 support. Flush
9730 standard error after writing to it.
9731 (attach_inferior): Likewise. Use protocol signal
9732 numbers.
9733 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9734 and names.
9735 * win32-i386-low.c: New file.
9736 * Makefile.in (XM_CLIBS): Set.
9737 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9738 (win32-i386-low.o): New dependency rule.
9739 * linux-low.c (linux_wait): Use target signal numbers.
9740 * target.h (struct target_ops): Doc fix.
9741 * server.h (target_signal_to_name): New prototype.
9742 * gdbreplay.c: Don't include headers unconditionally which
9743 are missing on mingw32. Include <winsock.h> for mingw32.
9744 (remote_close, remote_open): Adjust for Winsock support.
9745 * configure, config.in: Regenerated.
9746
0876f84a
DJ
97472006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9748
9749 * server.c (decode_xfer_read, write_qxfer_response): New.
9750 (handle_query): Take a packet length argument. Handle
9751 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9752 the qSupported response.
9753 (main): Update call to handle_query.
9754
01f9e8fa
DJ
97552006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9756
9757 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9758 (putpkt_binary): Renamed from putpkt and adjusted for binary
9759 data.
9760 (putpkt): New wrapper for putpkt_binary.
9761 (readchar): Don't mask off the high bit.
9762 (decode_X_packet): New function.
9763 * server.c (main): Call putpkt_binary if a handler sets the packet
9764 length. Save the length of the incoming packet. Handle 'X'.
9765 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9766
be2a5f71
DJ
97672006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9768
9769 * server.c (handle_query): Handle qSupported.
9770
ea025f5f
DJ
97712006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9772
9773 * remote-utils.c (all_symbols_looked_up): New variable.
9774 (look_up_one_symbol): Check it.
9775 * server.h (look_up_one_symbol): New declaration.
9776 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9777
9308fc88
DJ
97782006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9779
9780 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 9781 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
9782 (PTRACE_GET_THREAD_AREA): Define.
9783 (ps_get_thread_area): New function.
9784
52fb6437
NS
97852006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9786
9787 * configure.srv (m68k*-*-uclinux*): New target.
9788 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9789 (linux_resume_one_process): Remove extraneous cast.
9790 (linux_read_offsets): New.
9791 (linux_target_op): Add linux_read_offsets on mmuless systems.
9792 * server.c (handle_query): Add qOffsets logic.
9793 * target.h (struct target_ops): Add read_offsets.
9794
21b0f40c
DJ
97952006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9796
9797 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9798 (PTRACE_GET_THREAD_AREA): Define.
9799 (ps_get_thread_area): New function.
9800 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9801 (linux-x86-64-low.o): Update.
9802
0050a760
DJ
98032006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9804
9805 * configure.ac: Remove checks for prfpregset_t.
9806 * gdb_proc_service.h: New file.
9807 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9808 new "gdb_proc_service.h".
9809 * proc-service.c: Likewise.
9810 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9811 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9812 * Makefile.in (gdb_proc_service_h): Updated.
9813 * configure, config.in: Regenerated.
9814
b92a518e
DJ
98152006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9816
9817 * remote-utils.c (prepare_resume_reply): Move declaration
9818 of gdb_id_from_wait to the top of the block.
9819
545587ee
DJ
98202006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9821
9822 * linux-low.c (regsets_store_inferior_registers): Read the regset
9823 from the target before filling it.
9824
9db87ebd
DJ
98252006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9826
9827 * server.c (attach_inferior): Return SIGTRAP for a successful
9828 attach.
9829
dd24457d
DJ
98302006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9831
9832 * Makefile.in (OBS): Add version.o.
9833 (STAGESTUFF): Delete.
9834 (version.o): Add dependencies.
9835 (version.c): Replace rule.
9836 (clean): Remove version.c.
9837 * server.c (gdbserver_version): New.
9838 (gdbserver_usage): Use printf.
9839 (main): Handle --version and --help.
9840 * server.h (version, host_name): Add declarations.
9841
6f0f660e
EZ
98422005-12-23 Eli Zaretskii <eliz@gnu.org>
9843
889bf7c5
PA
9844 * linux-arm-low.c:
9845 * linux-arm-low.c:
9846 * inferiors.c:
9847 * i387-fp.h:
9848 * i387-fp.c:
9849 * gdbreplay.c:
9850 * regcache.c:
9851 * proc-service.c:
9852 * mem-break.h:
9853 * mem-break.c:
9854 * linux-x86-64-low.c:
9855 * linux-sh-low.c:
9856 * linux-s390-low.c:
9857 * linux-ppc64-low.c:
9858 * linux-ppc-low.c:
9859 * linux-mips-low.c:
9860 * linux-m68k-low.c:
9861 * linux-m32r-low.c:
9862 * linux-low.h:
9863 * linux-low.c:
9864 * linux-ia64-low.c:
9865 * linux-i386-low.c:
9866 * linux-crisv32-low.c:
9867 * thread-db.c:
9868 * terminal.h:
9869 * target.h:
9870 * target.c:
9871 * server.h:
9872 * server.c:
9873 * remote-utils.c:
9874 * regcache.h:
9875 * utils.c:
9876 * Makefile.in:
9877 * configure.ac:
6f0f660e
EZ
9878 * gdbserver.1: Add (C) after Copyright. Update the FSF
9879 address.
9880
9d1fb177
DJ
98812005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9882
9883 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9884 (arm_breakpoint_at): Recognize both breakpoints.
9885 (the_low_target): Use the correct breakpoint instruction.
9886
011a70c2
DJ
98872005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9888
9889 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9890 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9891 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9892 (the_low_target): Update.
9893
7fb85e41
AS
98942005-10-25 Andreas Schwab <schwab@suse.de>
9895
9896 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9897
9898 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9899 (ia64_num_regs): Reduce to 462.
9900
3db0444b
DJ
99012005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9902
9903 * acinclude.m4: Correct quoting.
9904 * aclocal.m4: Regenerated.
9905
9906 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9907 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9908 (thread_db_init): Call thread_db_err_str.
9909 * configure.ac: Check for TD_VERSION.
9910 * config.in, configure: Regenerated.
9911
bee0189a
DJ
99122005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9913
9914 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9915
e9d25b98
DJ
99162005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9917
9918 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9919 is not available. Define HAVE_PTRACE_GETREGS if it is.
9920 * config.in, configure: Regenerated.
9921 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9922 * linux-i386-low.c, linux-m68k-low.c: Update to use
9923 HAVE_PTRACE_GETREGS.
9924 * linux-low.c (regsets_fetch_inferior_registers)
9925 (regsets_store_inferior_registers): Only return 0 if we processed
9926 GENERAL_REGS.
9927 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9928 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9929
a06660f7
DJ
99302005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9931
9932 * inferiors.c (struct thread_info): Add gdb_id.
9933 (add_thread): Add gdb_id argument.
9934 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9935 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9936 calls to add_thread.
9937 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9938 * server.c (handle_query): Use thread_to_gdb_id.
9939 (handle_v_cont, main): Use gdb_id_to_thread_id.
9940 * server.h (add_thread): Update prototype.
9941 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9942 prototypes.
9943
5a1f5858
DJ
99442005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9945
9946 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9947 left-padded registers.
9948 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9949 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9950
e122f1f5
SE
99512005-07-01 Steve Ellcey <sje@cup.hp.com>
9952
9953 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9954 * configure: Regenerate.
9955 * config.in: Regenerate.
9956 * server.h (NEED_DECLARATION_STRERROR):
9957 Replace with !HAVE_DECL_STRERROR.
9958
d592fa2f
DJ
99592005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9960
9961 * linux-low.c (linux_wait, linux_send_signal): Don't test
9962 an unsigned long variable for > 0 if it could be MAX_ULONG.
9963 * server.c (myresume): Likewise.
9964 * target.c (set_desired_inferior): Likewise.
9965
ccbd4912
MK
99662005-06-13 Mark Kettenis <kettenis@gnu.org>
9967
9968 * configure.ac: Simplify and improve check for socklen_t.
9969 * configure, config.in: Regenerate.
9970
f450004a
DJ
99712005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9972
9973 * acconfig.h: Remove.
9974 * configure.ac: Add a test for socklen_t. Use three-argument
9975 AC_DEFINE throughout.
9976 * config.in: Regenerated using autoheader 2.59.
9977 * configure: Regenerated.
9978
9979 * gdbreplay.c (socklen_t): Provide a default.
9980 (remote_open): Use socklen_t.
9981 * remote-utils.c (socklen_t): Provide a default.
9982 (remote_open): Use socklen_t.
9983 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9984 unsigned char.
9985
9986 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9987 char for buffers.
9988 * linux-low.c (linux_read_memory, linux_write_memory)
9989 (linux_read_auxv): Likewise.
9990 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9991 (check_mem_write): Likewise.
9992 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9993 Likewise.
9994 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9995 (registers_from_string, register_data): Likewise.
9996 * server.c (handle_query, main): Likewise.
9997 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9998 (decode_M_packet): Likewise.
9999 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10000 * target.h (struct target_ops): Update read_memory, write_memory,
10001 and read_auxv.
10002 (read_inferior_memory, write_inferior_memory): Update.
10003 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10004 to unsigned char *.
10005 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10006 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10007 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10008 linux-s390-low.c, linux-sh-low.c: Update for changes in
10009 read_inferior_memory and the_low_target->breakpoint.
10010
eee84df1
DJ
100112005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10012
10013 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10014 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10015 * configure.srv: Add powerpc64-*-linux*.
10016 * linux-ppc64-low.c: New file.
10017
45b134e5
OF
100182005-05-23 Orjan Friberg <orjanf@axis.com>
10019
10020 * linux-cris-low.c: New file with support for CRIS.
10021 * linux-crisv32-low.c: Ditto for CRISv32.
10022 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10023 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10024 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10025 reg-crisv32.o, and reg-crisv32.c to make rules.
10026 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10027 recognized targets.
10028
48d93c75
UW
100292005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10030
10031 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10032 of sizeof (PTRACE_XFER_TYPE).
10033 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10034
e013ee27
OF
100352005-05-12 Orjan Friberg <orjanf@axis.com>
10036
889bf7c5 10037 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10038 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10039 pointers for hardware watchpoint support.
10040 * linux-low.h (struct linux_target_ops): Ditto.
10041 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10042 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10043 to linux_target_ops.
10044 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10045 reply packet.
10046 * server.c (main): Recognize 'Z' and 'z' packets.
10047
b0ded00b
UW
100482005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10049
10050 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10051 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10052 (the_low_target): Add new members.
10053
8643e2ad
DJ
100542005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10055
10056 * proc-service.c (ps_lgetregs): Search all_processes instead of
10057 all_threads.
10058
fc620387
DJ
100592005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10060
10061 * server.c (start_inferior): Change return type to int.
10062 (attach_inferior): Change sigptr to int *.
10063 (handle_v_cont, handle_v_requests): Change signal to int *.
10064 (main): Change signal to int.
10065
100662005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10067
10068 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10069 * configure.srv: Add m32r*-*-linux*.
10070 * linux-m32r-low.c: New file.
10071
e0e76420
DJ
100722005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10073
10074 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10075
a1928bad
DJ
100762005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10077
10078 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10079 Take unsigned long arguments for PIDs.
10080 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10081 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10082 (wait_for_sigstop, linux_resume_one_process)
10083 (regsets_fetch_inferior_registers, linux_send_signal)
10084 (linux_read_auxv): Likewise. Update the types of variables holding
10085 PIDs. Update format string specifiers.
10086 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10087 * remote-utils.c (prepare_resume_reply): Likewise.
10088 * server.c (cont_thread, general_thread, step_thread)
10089 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10090 unsigned long.
10091 (handle_query): Update format specifiers.
10092 (handle_v_cont, main): Use strtoul for thread IDs.
10093 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10094 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10095 (general_thread, step_thread, thread_from_wait)
10096 (old_thread_from_wait): Update.
10097 * target.h (struct thread_resume): Use unsigned long for THREAD.
10098 (struct target_ops): Use unsigned long for arguments to attach and
10099 thread_alive.
10100
dcdb98d2
DJ
101012005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10102
10103 * acinclude.m4: Include bfd/bfd.m4 directly.
10104 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10105 <agriffis@toolchain.org>.
10106 * aclocal.m4, configure: Regenerated.
10107
bec39cab
AC
101082005-01-07 Andrew Cagney <cagney@gnu.org>
10109
10110 * configure.ac: Rename configure.in, require autoconf 2.59.
10111 * configure: Re-generate.
10112
434c4c77
DJ
101132004-12-08 Daniel Jacobowitz <dan@debian.org>
10114
10115 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10116 LIBS when finished.
10117 * aclocal.m4: Regenerated.
10118 * configure: Regenerated.
10119
db1d3e1b
AS
101202004-11-21 Andreas Schwab <schwab@suse.de>
10121
10122 * linux-m68k-low.c (m68k_num_gregs): Define.
10123 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10124 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10125 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10126 (m68k_breakpoint_at): New. Add to the_low_target.
10127
10128 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10129 srv_linux_thread_db to yes.
10130
43360365
JB
101312004-10-20 Joel Brobecker <brobecker@gnat.com>
10132
10133 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10134 (ARCH_SET_FS): Likewise.
10135 (ARCH_GET_FS): Likewise.
10136 (ARCH_GET_GS): Likewise.
10137
fd500816
DJ
101382004-10-16 Daniel Jacobowitz <dan@debian.org>
10139
10140 * linux-i386-low.c (ps_get_thread_area): New.
10141 * linux-x86-64-low.c (ps_get_thread_area): New.
10142 * linux-low.c: Include <sys/syscall.h>.
10143 (linux_kill_one_process): Don't kill the first thread here.
10144 (linux_kill): Kill the first thread here.
10145 (kill_lwp): New function.
10146 (send_sigstop, linux_send_signal): Use it.
10147 * proc-service.c: Clean up #ifdefs.
10148 (fpregset_info): Delete.
10149 (ps_lgetregs): Update and enable implementation.
10150 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10151 implementations.
10152 * remote-utils.c (struct sym_cache, symbol_cache): New.
10153 (input_interrupt): Print a clearer message.
10154 (async_io_enabled): New variable.
10155 (enable_async_io, disable_async_io): Use it. Update comments.
10156 (look_up_one_symbol): Use the symbol cache.
10157 * thread-db.c (thread_db_look_up_symbols): New function.
10158 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10159
f6de3c42
DJ
101602004-10-16 Daniel Jacobowitz <dan@debian.org>
10161
10162 * configure.in: Test for -rdynamic.
10163 * configure: Regenerated.
10164 * Makefile (INTERNAL_LDFLAGS): New.
10165 (gdbserver, gdbreplay): Use it.
10166
2c0fc042
AC
101672004-09-02 Andrew Cagney <cagney@gnu.org>
10168
10169 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10170
075b3282
DJ
101712004-03-23 Daniel Jacobowitz <drow@mvista.com>
10172
10173 * linux-low.c (linux_wait): Clear all_processes list also.
10174
fa6a77dc
DJ
101752004-03-12 Daniel Jacobowitz <drow@mvista.com>
10176
10177 * linux-low.c: Include <errno.h>. Remove extern declaration of
10178 errno.
10179
6d782a97
DJ
101802004-03-12 Daniel Jacobowitz <drow@mvista.com>
10181
10182 * gdbreplay.c, server.h, utils.c: Update copyright years.
10183
3a7fb99b
DJ
101842004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10185
10186 * server.c (main): Print child status or termination signal from
10187 variable 'signal', not 'sig'.
10188
c3e735a6
DJ
101892004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10190
10191 * linux-low.c (linux_read_memory): Change return type to
10192 int. Check for and return error from ptrace().
10193 * target.c (read_inferior_memory): Change return type to int. Pass
10194 back return status from the_target->read_memory().
10195 * target.h (struct target_ops): Adapt *read_memory() prototype.
10196 Update comment.
10197 (read_inferior_memory): Adapt prototype.
10198 * server.c (main): Return an error packet if
10199 read_inferior_memory() returns an error.
10200
a59d1c82
DJ
102012004-03-04 Daniel Jacobowitz <drow@mvista.com>
10202
10203 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10204 Unify with other clean targets.
10205
dc3f8883
DJ
102062004-02-29 Daniel Jacobowitz <drow@mvista.com>
10207
10208 * server.c (handle_v_cont): Call set_desired_inferior.
10209
89a208da
DJ
102102004-02-29 Daniel Jacobowitz <drow@mvista.com>
10211
10212 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10213
62ea82f5
DJ
102142004-02-29 Daniel Jacobowitz <drow@mvista.com>
10215
10216 * linux-low.c (linux_wait): Unblock async I/O.
10217 (linux_resume): Block and enable async I/O.
10218 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10219 * server.h (block_async_io, unblock_async_io): Add prototypes.
10220
6910d122
DJ
102212004-02-29 Daniel Jacobowitz <drow@mvista.com>
10222
10223 * remote-utils.c (remote_open): Print a status notice after
10224 opening a TCP port.
10225 * server.c (attach_inferior): Print a status notice after
10226 attaching.
10227
102282004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10229
10230 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10231
c89dc5d4
DJ
102322004-02-26 Daniel Jacobowitz <drow@mvista.com>
10233
10234 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10235 error packet.
10236 * server.c, target.h: Update copyright years.
10237
4b8dad4a
RM
102382004-02-25 Roland McGrath <roland@redhat.com>
10239
10240 * target.h (struct target_ops): New member `read_auxv'.
10241 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10242 * linux-low.c (linux_read_auxv): New function.
10243 (linux_target_ops): Initialize `read_auxv' member to that.
10244
d7446758
JB
102452004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10246
10247 Committed by Jim Blandy <jimb@redhat.com>.
10248
10249 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10250 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10251 instead of GPR_SIZE to distiguish s390 and s390x targets.
10252
5544ad89
DJ
102532004-01-31 Daniel Jacobowitz <drow@mvista.com>
10254
10255 * linux-low.c: Update copyright year.
10256 (check_removed_breakpoint): Clear pending_is_breakpoint.
10257 (linux_set_resume_request, linux_queue_one_thread)
10258 (resume_status_pending_p): New functions.
10259 (linux_continue_one_thread): Use process->resume.
10260 (linux_resume): Only resume threads if there are no pending events.
10261 * linux-low.h (struct process_info): Add resume request
10262 pointer.
10263
2a68b70e
DJ
102642004-01-30 Daniel Jacobowitz <drow@mvista.com>
10265
10266 * regcache.c (new_register_cache): Clear the allocated register
10267 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10268
64386c31
DJ
102692003-10-13 Daniel Jacobowitz <drow@mvista.com>
10270
10271 * linux-low.c (linux_resume): Take a struct thread_resume *
10272 argument.
10273 (linux_wait): Update call.
10274 (resume_ptr): New static variable.
10275 (linux_continue_one_thread): Renamed from
10276 linux_continue_one_process. Use resume_ptr.
10277 (linux_resume): Use linux_continue_one_thread.
10278 * server.c (handle_v_cont, handle_v_requests): New functions.
10279 (myresume): New function.
10280 (main): Handle 'v' case.
10281 * target.h (struct thread_resume): New type.
10282 (struct target_ops): Change argument of "resume" to struct
10283 thread_resume *.
10284 (myresume): Delete macro.
10285
c938e9b0
L
102862003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10287
10288 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10289 (uninstall): Support DESTDIR.
10290
7f313d07
BC
10291Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10292
10293 * configure.srv: Add xscale*linux copy of arm*linux entry.
10294
3b2fc2ea
DJ
102952003-07-24 Daniel Jacobowitz <drow@mvista.com>
10296
10297 * linux-arm-low.c (arm_reinsert_addr): New function.
10298 (the_low_target): Add arm_reinsert_addr.
10299
1c0a559e
MK
103002003-07-08 Mark Kettenis <kettenis@gnu.org>
10301
10302 * mem-break.c: Remove whitespace at end of file.
10303
43d5792c
DJ
103042003-06-28 Daniel Jacobowitz <drow@mvista.com>
10305
10306 * configure.in: Check whether we need to prototype strerror.
10307 * server.h: Optionally prototype strerror.
10308 * gdbreplay.c (perror_with_name): Use strerror.
10309 * linux-low.c (linux_attach_lwp): Use strerror.
10310 * utils.c (perror_with_name): Use strerror.
10311 * config.in, configure: Regenerated.
10312
c8a86edf
DJ
103132003-06-28 Daniel Jacobowitz <drow@mvista.com>
10314
10315 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10316 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10317
73d37363
DJ
103182003-06-20 Daniel Jacobowitz <drow@mvista.com>
10319
10320 * Makefile.in (SFILES): Update.
10321 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10322 low-sun3.c: Remove files.
10323
6ad8ae5c
DJ
103242003-06-17 Daniel Jacobowitz <drow@mvista.com>
10325
10326 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10327 (linux_detach_one_process, linux_detach): New functions.
10328 (linux_target_ops): Add linux_detach.
10329 * server.c (main): Handle 'D' packet.
10330 * target.h (struct target_ops): Add "detach" member.
10331 (detach_inferior): Define.
10332
1581182a
MK
103332003-06-13 Mark Kettenis <kettenis@gnu.org>
10334
10335 From Kelley Cook <kelleycook@wideopenwest.com>:
10336 * configure.srv: Accept i[34567]86 variants.
10337
e5379b03
DJ
103382003-06-05 Daniel Jacobowitz <drow@mvista.com>
10339
10340 * linux-low.c (linux_wait_for_event): Correct comment typos.
10341 (linux_resume_one_process): Call check_removed_breakpoint.
10342 (linux_send_signal): New function.
10343 (linux_target_ops): Add linux_send_signal.
10344 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10345 of kill.
10346 * target.h (struct target_ops): Add send_signal.
10347
2ff29de4
JB
103482003-05-29 Jim Blandy <jimb@redhat.com>
10349
10350 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10351 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10352 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10353 away part of the register's value.
10354
254787d4
DJ
103552003-03-26 Daniel Jacobowitz <drow@mvista.com>
10356
10357 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10358 (linux_wait_for_event, linux_init_signals): Likewise.
10359
94e10508
DJ
103602003-03-17 Daniel Jacobowitz <drow@mvista.com>
10361
10362 * configure.in: Check for stdlib.h.
10363 * configure: Regenerated.
10364 * config.in: Regenerated.
10365
4c0711e0
DJ
103662003-01-04 Andreas Schwab <schwab@suse.de>
10367
10368 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10369
ef66e766
AC
103702003-01-02 Andrew Cagney <ac131313@redhat.com>
10371
10372 * Makefile.in: Remove obsolete code.
10373
a1358604
DJ
103742002-11-20 Daniel Jacobowitz <drow@mvista.com>
10375
10376 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10377 defined(PT_FPR0_HI).
10378
23ce3b1c
DJ
103792002-11-17 Stuart Hughes <seh@zee2.com>
10380
10381 * linux-arm-low.c (arm_num_regs): Increase.
10382 (arm_regmap): Include status register.
10383
103842002-11-17 Daniel Jacobowitz <drow@mvista.com>
10385
10386 * linux-low.c (register_addr): Remove incorrect -1 check.
10387
a9fa9f7d
DJ
103882002-08-29 Daniel Jacobowitz <drow@mvista.com>
10389
10390 * linux-low.c (linux_create_inferior): Call setpgid. Return
10391 the new PID.
10392 (unstopped_p, linux_signal_pid): Remove.
10393 (linux_target_ops): Remove linux_signal_pid.
10394 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10395 global instead of target method.
10396 * target.h (struct target_ops): Remove signal_pid. Update comment
10397 for create_inferior.
10398 * server.c (signal_pid): New variable.
10399 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10400 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10401 (attach_inferior): Set signal_pid.
10402
17574093
DJ
104032002-08-23 Daniel Jacobowitz <drow@mvista.com>
10404
10405 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10406
104072002-08-20 Jim Blandy <jimb@redhat.com>
10408
10409 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10410 default for this.
10411
104122002-08-01 Andrew Cagney <cagney@redhat.com>
10413
10414 * Makefile.in: Make chill references obsolete.
10415
104162002-07-24 Kevin Buettner <kevinb@redhat.com>
10417
10418 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10419 * configure: Regenerate.
10420 * config.in: Regenerate.
10421
104222002-07-09 David O'Brien <obrien@FreeBSD.org>
10423
10424 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10425 (perror_with_name, remote_close, remote_open, expect, play): Static.
10426
104272002-07-04 Michal Ludvig <mludvig@suse.cz>
10428
4b8dad4a 10429 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10430 byte offsets instead of an array of indexes.
10431 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10432
104332002-06-13 Daniel Jacobowitz <drow@mvista.com>
10434
10435 * regcache.c: Add comment.
10436
104372002-06-11 Daniel Jacobowitz <drow@mvista.com>
10438
10439 * thread-db.c: New file.
10440 * proc-service.c: New file.
10441 * acinclude.m4: New file.
10442 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10443 proc-service.o, and thread-db.o.
10444 (linux-low.o): Add USE_THREAD_DB.
10445 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10446 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10447 * aclocal.m4: Regenerated.
10448 * config.in: Regenerated.
10449 * configure: Regenerated.
10450 * configure.in: Check for proc_service.h, sys/procfs.h,
10451 thread_db.h, and linux/elf.h headrs.
10452 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10453 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10454 Check for -lthread_db and thread support.
10455 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10456 PowerPC, and SuperH.
10457 * i387-fp.c: Constify arguments.
10458 * i387-fp.h: Likewise.
10459 * inferiors.c: (struct thread_info): Renamed from
10460 `struct inferior_info'. Remove PID member. Use generic inferior
10461 list header. All uses updated.
10462 (inferiors, signal_pid): Removed.
10463 (all_threads): New variable.
10464 (get_thread): Define.
10465 (add_inferior_to_list): New function.
10466 (for_each_inferior): New function.
10467 (change_inferior_id): New function.
10468 (add_inferior): Removed.
10469 (remove_inferior): New function.
10470 (add_thread): New function.
10471 (free_one_thread): New function.
10472 (remove_thread): New function.
10473 (clear_inferiors): Use for_each_inferior and free_one_thread.
10474 (find_inferior): New function.
10475 (find_inferior_id): New function.
10476 (inferior_target_data): Update argument type.
10477 (set_inferior_target_data): Likewise.
10478 (inferior_regcache_data): Likewise.
10479 (set_inferior_regcache_data): Likewise.
10480 * linux-low.c (linux_bp_reinsert): Remove.
10481 (all_processes, stopping_threads, using_thrads)
10482 (struct pending_signals, debug_threads, pid_of): New.
10483 (inferior_pid): Replace with macro.
10484 (struct inferior_linux_data): Remove.
10485 (get_stop_pc, add_process): New functions.
10486 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10487 Use add_process and add_thread.
10488 (linux_attach_lwp): New function, based on old linux_attach. Use
10489 add_process and add_thread. Set stop_expected for new threads.
10490 (linux_attach): New function.
10491 (linux_kill_one_process): New function.
10492 (linux_kill): Kill all LWPs.
10493 (linux_thread_alive): Use find_inferior_id.
10494 (check_removed_breakpoints, status_pending_p): New functions.
10495 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10496 Update. Use WNOHANG. Wait for cloned processes also. Update process
10497 struct for the found process.
10498 (linux_wait_for_event): New function.
10499 (linux_wait): Use it. Support LWPs.
10500 (send_sigstop, wait_for_sigstop, stop_all_processes)
10501 (linux_resume_one_process, linux_continue_one_process): New functions.
10502 (linux_resume): Support LWPs.
10503 (REGISTER_RAW_SIZE): Remove.
10504 (fetch_register): Use register_size instead. Call supply_register.
10505 (usr_store_inferior_registers): Likewise. Call collect_register.
10506 Fix recursive case.
10507 (regsets_fetch_inferior_registers): Improve error message.
10508 (regsets_store_inferior_registers): Add debugging.
10509 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10510 (unstopped_p, linux_signal_pid): New functions.
10511 (linux_target_ops): Add linux_signal_pid.
10512 (linux_init_signals): New function.
10513 (initialize_low): Call it. Initialize using_threads.
10514 * regcache.c (inferior_regcache_data): Add valid
10515 flag.
10516 (get_regcache): Fetch registers lazily. Add fetch argument
10517 and update all callers.
10518 (regcache_invalidate_one, regcache_invalidate): New
10519 functions.
10520 (new_register_cache): Renamed from create_register_cache.
10521 Return the new regcache.
10522 (free_register_cache): Change argument to a void *.
10523 (registers_to_string, registers_from_string): Call get_regcache
10524 with fetch flag set.
10525 (register_data): Make static. Pass fetch flag to get_regcache.
10526 (supply_register): Call get_regcache with fetch flag clear.
10527 (collect_register): Call get_regcache with fetch flag set.
10528 (collect_register_as_string): New function.
10529 * regcache.h: Update.
10530 * remote-utils.c (putpkt): Flush after debug output and use
10531 stderr.
10532 Handle input interrupts while waiting for an ACK.
10533 (input_interrupt): Use signal_pid method.
10534 (getpkt): Flush after debug output and use stderr.
10535 (outreg): Use collect_register_as_string.
10536 (new_thread_notify, dead_thread_notify): New functions.
10537 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10538 and general_thread.
10539 (look_up_one_symbol): Flush after debug output.
10540 * server.c (step_thread, server_waiting): New variables.
10541 (start_inferior): Don't use signal_pid. Update call to mywait.
10542 (attach_inferior): Update call to mywait.
10543 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10544 (main): Don't fetch/store registers explicitly. Use
10545 set_desired_inferior. Support proposed ``Hs'' packet. Update
10546 calls to mywait.
10547 * server.h: Update.
10548 (struct inferior_list, struct_inferior_list_entry): New.
10549 * target.c (set_desired_inferior): New.
10550 (write_inferior_memory): Constify.
10551 (mywait): New function.
10552 * target.h: Update.
10553 (struct target_ops): New signal_pid method.
10554 (mywait): Removed macro, added prototype.
10555
10556 * linux-low.h (regset_func): Removed.
10557 (regset_fill_func, regset_store_func): New.
10558 (enum regset_type): New.
10559 (struct regset_info): Add type field. Use new operation types.
10560 (struct linux_target_ops): stop_pc renamed to get_pc.
10561 Add decr_pc_after_break and breakpoint_at.
10562 (get_process, get_thread_proess, get_process_thread)
10563 (strut process_info, all_processes, linux_attach_lwp)
10564 (thread_db_init): New.
10565
10566 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10567 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10568 (the_low_target): Add new members.
10569 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10570 (i386_store_fpxregset): Constify.
10571 (target_regsets): Add new kind identifier.
10572 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10573 (i386_set_pc): Add debugging.
10574 (i386_breakpoint_at): New function.
10575 (the_low_target): Add new members.
10576 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10577 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10578 (mips_breakpoint_at): New.
10579 (the_low_target): Add new members.
10580 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10581 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10582 (the_low_target): Add new members.
10583 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10584 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10585 (the_low_target): Add new members.
10586 * linux-x86-64-low.c (target_regsets): Add new kind
10587 identifier.
10588
105892002-05-15 Daniel Jacobowitz <drow@mvista.com>
10590
10591 From Martin Pool <mbp@samba.org>:
10592 * server.c (gdbserver_usage): New function.
10593 (main): Call it.
10594
105952002-05-14 Daniel Jacobowitz <drow@mvista.com>
10596
10597 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10598 stop_at -> stop_pc.
10599
106002002-05-04 Andrew Cagney <ac131313@redhat.com>
10601
10602 * Makefile.in: Remove obsolete code.
10603
106042002-04-24 Michal Ludvig <mludvig@suse.cz>
10605
10606 * linux-low.c (regsets_fetch_inferior_registers),
10607 (regsets_store_inferior_registers): Removed cast to int from
10608 ptrace() calls.
10609 * regcache.h: Added declaration of struct inferior_info.
10610
106112002-04-20 Daniel Jacobowitz <drow@mvista.com>
10612
10613 * inferiors.c (struct inferior_info): Add regcache_data.
10614 (add_inferior): Call create_register_cache.
10615 (clear_inferiors): Call free_register_cache.
10616 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10617 * regcache.c (struct inferior_regcache_data): New.
10618 (registers): Remove.
10619 (get_regcache): New function.
10620 (create_register_cache, free_register_cache): New functions.
10621 (set_register_cache): Don't initialize the register cache here.
10622 (registers_to_string, registers_from_string, register_data): Call
10623 get_regcache.
10624 * regcache.h: Add prototypes.
10625 * server.h: Likewise.
10626
106272002-04-20 Daniel Jacobowitz <drow@mvista.com>
10628
10629 * mem-break.c: New file.
10630 * mem-break.h: New file.
10631 * Makefile.in: Add mem-break.o rule; update server.h
10632 dependencies.
10633 * inferiors.c (struct inferior_info): Add target_data
10634 member.
10635 (clear_inferiors): Free target_data member if set.
10636 (inferior_target_data, set_inferior_target_data): New functions.
10637 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10638 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10639 * linux-low.c (linux_bp_reinsert): New variable.
10640 (struct inferior_linux_data): New.
10641 (linux_create_inferior): Use set_inferior_target_data.
10642 (linux_attach): Likewise. Call add_inferior.
10643 (linux_wait_for_one_inferior): New function.
10644 (linux_wait): Call it.
10645 (linux_write_memory): Add const.
10646 (initialize_low): Call set_breakpoint_data.
10647 * linux-low.h (struct linux_target_ops): Add breakpoint
10648 handling members.
10649 * server.c (attach_inferior): Remove extra add_inferior
10650 call.
10651 * server.h: Include mem-break.h. Update inferior.c
10652 prototypes.
10653 * target.c (read_inferior_memory)
10654 (write_inferior_memory): New functions.
10655 * target.h (read_inferior_memory)
10656 (write_inferior_memory): Change macros to prototypes.
10657 (struct target_ops): Update comments. Add const to write_memory
10658 definition.
10659
106602002-04-11 Daniel Jacobowitz <drow@mvista.com>
10661
10662 * linux-low.c (usr_store_inferior_registers): Support
10663 registers which are allowed to fail to store.
10664 * linux-low.h (linux_target_ops): Likewise.
10665 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10666 (ppc_cannot_store_register): FPSCR may not be storable.
10667
106682002-04-09 Daniel Jacobowitz <drow@mvista.com>
10669
10670 * server.h: Include <string.h> if HAVE_STRING_H.
10671 * ChangeLog: Correct paths in last ChangeLog entry.
10672
106732002-04-09 Daniel Jacobowitz <drow@mvista.com>
10674
10675 * linux-low.h: Remove obsolete prototypes.
10676 (struct linux_target_ops): New.
10677 (extern the_low_target): New.
10678 * linux-low.c (num_regs, regmap): Remove declarations.
10679 (register_addr): Use the_low_target explicitly.
10680 (fetch_register): Likewise.
10681 (usr_fetch_inferior_registers): Likewise.
10682 (usr_store_inferior_registers): Likewise.
10683 * linux-arm-low.c (num_regs): Remove.
10684 (arm_num_regs): Define.
10685 (arm_regmap): Renamed from regmap, made static.
10686 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10687 made static.
10688 (arm_cannot_store_register): Renamed from cannot_store_register,
10689 made static.
10690 (the_low_target): New.
10691 * linux-i386-low.c (num_regs): Remove.
10692 (i386_num_regs): Define.
10693 (i386_regmap): Renamed from regmap, made static.
10694 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10695 made static.
10696 (i386_cannot_store_register): Renamed from cannot_store_register,
10697 made static.
10698 (the_low_target): New.
10699 * linux-ia64-low.c (num_regs): Remove.
10700 (ia64_num_regs): Define.
10701 (ia64_regmap): Renamed from regmap, made static.
10702 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10703 made static.
10704 (ia64_cannot_store_register): Renamed from cannot_store_register,
10705 made static.
10706 (the_low_target): New.
10707 * linux-m68k-low.c (num_regs): Remove.
10708 (m68k_num_regs): Define.
10709 (m68k_regmap): Renamed from regmap, made static.
10710 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10711 made static.
10712 (m68k_cannot_store_register): Renamed from cannot_store_register,
10713 made static.
10714 (the_low_target): New.
10715 * linux-mips-low.c (num_regs): Remove.
10716 (mips_num_regs): Define.
10717 (mips_regmap): Renamed from regmap, made static.
10718 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10719 made static.
10720 (mips_cannot_store_register): Renamed from cannot_store_register,
10721 made static.
10722 (the_low_target): New.
10723 * linux-ppc-low.c (num_regs): Remove.
10724 (ppc_num_regs): Define.
10725 (ppc_regmap): Renamed from regmap, made static.
10726 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10727 made static.
10728 (ppc_cannot_store_register): Renamed from cannot_store_register,
10729 made static.
10730 (the_low_target): New.
10731 * linux-s390-low.c (num_regs): Remove.
10732 (s390_num_regs): Define.
10733 (s390_regmap): Renamed from regmap, made static.
10734 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10735 made static.
10736 (s390_cannot_store_register): Renamed from cannot_store_register,
10737 made static.
10738 (the_low_target): New.
10739 * linux-sh-low.c (num_regs): Remove.
10740 (sh_num_regs): Define.
10741 (sh_regmap): Renamed from regmap, made static.
10742 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10743 made static.
10744 (sh_cannot_store_register): Renamed from cannot_store_register,
10745 made static.
10746 (the_low_target): New.
10747 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10748 (the_low_target): New.
10749
107502002-04-09 Daniel Jacobowitz <drow@mvista.com>
10751
10752 * Makefile.in: Add stamp-h target.
10753 * configure.in: Create stamp-h.
10754 * configure: Regenerated.
10755
107562002-04-09 Daniel Jacobowitz <drow@mvista.com>
10757
10758 * inferiors.c: New file.
10759 * target.c: New file.
10760 * target.h: New file.
10761 * Makefile.in: Add target.o and inferiors.o. Update
10762 dependencies.
10763 * linux-low.c (inferior_pid): New static variable,
10764 moved from server.c.
10765 (linux_create_inferior): Renamed from create_inferior.
10766 Call add_inferior. Return 0 on success instead of a PID.
10767 (linux_attach): Renamed from myattach.
10768 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10769 (linux_thread_alive): Renamed from mythread_alive.
10770 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10771 child dies.
10772 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10773 (regsets_store_inferior_registers): Correct error message.
10774 Add missing ``return 0''.
10775 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10776 (linux_store_registers): Renamed from store_inferior_registers.
10777 (linux_read_memory): Renamed from read_inferior_memory.
10778 (linux_write_memory): Renamed from write_inferior_memory.
10779 (linux_target_ops): New structure.
10780 (initialize_low): Call set_target_ops ().
10781 * remote-utils.c (unhexify): New function.
10782 (hexify): New function.
10783 (input_interrupt): Send signals to ``signal_pid''.
10784 * server.c (inferior_pid): Remove.
10785 (start_inferior): Update create_inferior call.
10786 (attach_inferior): Call add_inferior.
10787 (handle_query): New function.
10788 (main): Call handle_query for `q' packets.
10789 * server.h: Include "target.h". Remove obsolete prototypes.
10790 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10791
107922002-04-09 Daniel Jacobowitz <drow@mvista.com>
10793
10794 * Makefile.in: Add WARN_CFLAGS. Update configury
10795 dependencies.
10796 * configure.in: Check for <string.h>
10797 * configure: Regenerate.
10798 * config.in: Regenerate.
10799 * gdbreplay.c: Include needed system headers.
10800 (remote_open): Remove strchr prototype.
10801 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10802 * regcache.c (supply_register): Change buf argument to const void *.
10803 (supply_register_by_name): Likewise.
10804 (collect_register): Change buf argument to void *.
10805 (collect_register_by_name): Likewise.
10806 * regcache.h: Add missing prototypes.
10807 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10808 * server.c (handle_query): New function.
10809 (attached): New static variable, moved out of main.
10810 (main): Quiet longjmp clobber warnings.
10811 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10812 * utils.c (error): Remove NORETURN.
10813 (fatal): Likewise.
This page took 1.960025 seconds and 4 git commands to generate.